ShellBanner
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:22.19 GB of 70.42 GB (31.51%)
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,

/ usr/ src/ linux-headers-3.0.0-14/ arch/ x86/ include/ asm/ - drwxr-xr-x

Directory:
Viewing file:     cmpxchg_64.h (4.01 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#ifndef _ASM_X86_CMPXCHG_64_H
#define _ASM_X86_CMPXCHG_64_H

#include <asm/alternative.h> /* Provides LOCK_PREFIX */

static inline void set_64bit(volatile u64 *ptr, u64 val)
{
    *ptr = val;
}

extern void __xchg_wrong_size(void);
extern void __cmpxchg_wrong_size(void);

/*
 * Note: no "lock" prefix even on SMP: xchg always implies lock anyway.
 * Since this is generally used to protect other memory information, we
 * use "asm volatile" and "memory" clobbers to prevent gcc from moving
 * information around.
 */
#define __xchg(x, ptr, size)                        \
({                                    \
    __typeof(*(ptr)) __x = (x);                    \
    switch (size) {                            \
    case 1:                                \
    {                                \
        volatile u8 *__ptr = (volatile u8 *)(ptr);        \
        asm volatile("xchgb %0,%1"                \
                 : "=q" (__x), "+m" (*__ptr)        \
                 : "0" (__x)                \
                 : "memory");                \
        break;                            \
    }                                \
    case 2:                                \
    {                                \
        volatile u16 *__ptr = (volatile u16 *)(ptr);        \
        asm volatile("xchgw %0,%1"                \
                 : "=r" (__x), "+m" (*__ptr)        \
                 : "0" (__x)                \
                 : "memory");                \
        break;                            \
    }                                \
    case 4:                                \
    {                                \
        volatile u32 *__ptr = (volatile u32 *)(ptr);        \
        asm volatile("xchgl %0,%1"                \
                 : "=r" (__x), "+m" (*__ptr)        \
                 : "0" (__x)                \
                 : "memory");                \
        break;                            \
    }                                \
    case 8:                                \
    {                                \
        volatile u64 *__ptr = (volatile u64 *)(ptr);        \
        asm volatile("xchgq %0,%1"                \
                 : "=r" (__x), "+m" (*__ptr)        \
                 : "0" (__x)                \
                 : "memory");                \
        break;                            \
    }                                \
    default:                            \
        __xchg_wrong_size();                    \
    }                                \
    __x;                                \
})

#define xchg(ptr, v)                            \
    __xchg((v), (ptr), sizeof(*ptr))

#define __HAVE_ARCH_CMPXCHG 1

/*
 * Atomic compare and exchange.  Compare OLD with MEM, if identical,
 * store NEW in MEM.  Return the initial value in MEM.  Success is
 * indicated by comparing RETURN with OLD.
 */
#define __raw_cmpxchg(ptr, old, new, size, lock)            \
({                                    \
    __typeof__(*(ptr)) __ret;                    \
    __typeof__(*(ptr)) __old = (old);                \
    __typeof__(*(ptr)) __new = (new);                \
    switch (size) {                            \
    case 1:                                \
    {                                \
        volatile u8 *__ptr = (volatile u8 *)(ptr);        \
        asm volatile(lock "cmpxchgb %2,%1"            \
                 : "=a" (__ret), "+m" (*__ptr)        \
                 : "q" (__new), "0" (__old)            \
                 : "memory");                \
        break;                            \
    }                                \
    case 2:                                \
    {                                \
        volatile u16 *__ptr = (volatile u16 *)(ptr);        \
        asm volatile(lock "cmpxchgw %2,%1"            \
                 : "=a" (__ret), "+m" (*__ptr)        \
                 : "r" (__new), "0" (__old)            \
                 : "memory");                \
        break;                            \
    }                                \
    case 4:                                \
    {                                \
        volatile u32 *__ptr = (volatile u32 *)(ptr);        \
        asm volatile(lock "cmpxchgl %2,%1"            \
                 : "=a" (__ret), "+m" (*__ptr)        \
                 : "r" (__new), "0" (__old)            \
                 : "memory");                \
        break;                            \
    }                                \
    case 8:                                \
    {                                \
        volatile u64 *__ptr = (volatile u64 *)(ptr);        \
        asm volatile(lock "cmpxchgq %2,%1"            \
                 : "=a" (__ret), "+m" (*__ptr)        \
                 : "r" (__new), "0" (__old)            \
                 : "memory");                \
        break;                            \
    }                                \
    default:                            \
        __cmpxchg_wrong_size();                    \
    }                                \
    __ret;                                \
})

#define __cmpxchg(ptr, old, new, size)                    \
    __raw_cmpxchg((ptr), (old), (new), (size), LOCK_PREFIX)

#define __sync_cmpxchg(ptr, old, new, size)                \
    __raw_cmpxchg((ptr), (old), (new), (size), "lock; ")

#define __cmpxchg_local(ptr, old, new, size)                \
    __raw_cmpxchg((ptr), (old), (new), (size), "")

#define cmpxchg(ptr, old, new)                        \
    __cmpxchg((ptr), (old), (new), sizeof(*ptr))

#define sync_cmpxchg(ptr, old, new)                    \
    __sync_cmpxchg((ptr), (old), (new), sizeof(*ptr))

#define cmpxchg_local(ptr, old, new)                    \
    __cmpxchg_local((ptr), (old), (new), sizeof(*ptr))

#define cmpxchg64(ptr, o, n)                        \
({                                    \
    BUILD_BUG_ON(sizeof(*(ptr)) != 8);                \
    cmpxchg((ptr), (o), (n));                    \
})

#define cmpxchg64_local(ptr, o, n)                    \
({                                    \
    BUILD_BUG_ON(sizeof(*(ptr)) != 8);                \
    cmpxchg_local((ptr), (o), (n));                    \
})

#endif /* _ASM_X86_CMPXCHG_64_H */
Command:
Quick Commands:
Upload:
[Read-Only] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [Read-Only]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.3255 seconds