|
System | : | Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686 |
Software | : | Apache. PHP/5.3.6-13ubuntu3.10 |
ID | : | uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
|
|
Safe Mode | : | OFF |
Open_Basedir | : | OFF |
Freespace | : | 20.22 GB of 70.42 GB (28.72%) |
|
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON |
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
|
[ System Info ]
[ Processes ]
[ SQL Manager ]
[ Eval ]
[ Encoder ]
[ Mailer ]
[ Back Connection ]
[ Backdoor Server ]
[ Kernel Exploit Search ]
[ MD5 Decrypter ]
[ Reverse IP ]
[ Kill Shell ]
[ FTP Brute-Force ]
|
|
/
usr/
src/
linux-headers-3.0.0-14/
arch/
tile/
include/
asm/
- drwxr-xr-x
|
Viewing file: futex.h (3.52 KB) -rw-r--r--Select action/file-type:  ( +) |  ( +) |  ( +) | Code ( +) | Session ( +) |  ( +) | SDB ( +) |  ( +) |  ( +) |  ( +) |  ( +) |  ( +) |
/* * Copyright 2010 Tilera Corporation. All Rights Reserved. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, version 2. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or * NON INFRINGEMENT. See the GNU General Public License for * more details. * * These routines make two important assumptions: * * 1. atomic_t is really an int and can be freely cast back and forth * (validated in __init_atomic_per_cpu). * * 2. userspace uses sys_cmpxchg() for all atomic operations, thus using * the same locking convention that all the kernel atomic routines use. */
#ifndef _ASM_TILE_FUTEX_H #define _ASM_TILE_FUTEX_H
#ifndef __ASSEMBLY__
#include <linux/futex.h> #include <linux/uaccess.h> #include <linux/errno.h>
extern struct __get_user futex_set(u32 __user *v, int i); extern struct __get_user futex_add(u32 __user *v, int n); extern struct __get_user futex_or(u32 __user *v, int n); extern struct __get_user futex_andn(u32 __user *v, int n); extern struct __get_user futex_cmpxchg(u32 __user *v, int o, int n);
#ifndef __tilegx__ extern struct __get_user futex_xor(u32 __user *v, int n); #else static inline struct __get_user futex_xor(u32 __user *uaddr, int n) { struct __get_user asm_ret = __get_user_4(uaddr); if (!asm_ret.err) { int oldval, newval; do { oldval = asm_ret.val; newval = oldval ^ n; asm_ret = futex_cmpxchg(uaddr, oldval, newval); } while (asm_ret.err == 0 && oldval != asm_ret.val); } return asm_ret; } #endif
static inline int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) { int op = (encoded_op >> 28) & 7; int cmp = (encoded_op >> 24) & 15; int oparg = (encoded_op << 8) >> 20; int cmparg = (encoded_op << 20) >> 20; int ret; struct __get_user asm_ret;
if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) oparg = 1 << oparg;
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) return -EFAULT;
pagefault_disable(); switch (op) { case FUTEX_OP_SET: asm_ret = futex_set(uaddr, oparg); break; case FUTEX_OP_ADD: asm_ret = futex_add(uaddr, oparg); break; case FUTEX_OP_OR: asm_ret = futex_or(uaddr, oparg); break; case FUTEX_OP_ANDN: asm_ret = futex_andn(uaddr, oparg); break; case FUTEX_OP_XOR: asm_ret = futex_xor(uaddr, oparg); break; default: asm_ret.err = -ENOSYS; } pagefault_enable();
ret = asm_ret.err;
if (!ret) { switch (cmp) { case FUTEX_OP_CMP_EQ: ret = (asm_ret.val == cmparg); break; case FUTEX_OP_CMP_NE: ret = (asm_ret.val != cmparg); break; case FUTEX_OP_CMP_LT: ret = (asm_ret.val < cmparg); break; case FUTEX_OP_CMP_GE: ret = (asm_ret.val >= cmparg); break; case FUTEX_OP_CMP_LE: ret = (asm_ret.val <= cmparg); break; case FUTEX_OP_CMP_GT: ret = (asm_ret.val > cmparg); break; default: ret = -ENOSYS; } } return ret; }
static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval) { struct __get_user asm_ret;
if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) return -EFAULT;
asm_ret = futex_cmpxchg(uaddr, oldval, newval); *uval = asm_ret.val; return asm_ret.err; }
#ifndef __tilegx__ /* Return failure from the atomic wrappers. */ struct __get_user __atomic_bad_address(int __user *addr); #endif
#endif /* !__ASSEMBLY__ */
#endif /* _ASM_TILE_FUTEX_H */
|