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:25.51 GB of 70.42 GB (36.22%)
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/ include/ asm-generic/ - drwxr-xr-x

Directory:
Viewing file:     atomic.h (3.88 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*
 * Generic C implementation of atomic counter operations
 * Originally implemented for MN10300.
 *
 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
 * Written by David Howells (dhowells@redhat.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public Licence
 * as published by the Free Software Foundation; either version
 * 2 of the Licence, or (at your option) any later version.
 */
#ifndef __ASM_GENERIC_ATOMIC_H
#define __ASM_GENERIC_ATOMIC_H

#ifdef CONFIG_SMP
#error not SMP safe
#endif

/*
 * Atomic operations that C can't guarantee us.  Useful for
 * resource counting etc..
 */

#define ATOMIC_INIT(i)    { (i) }

#ifdef __KERNEL__

/**
 * atomic_read - read atomic variable
 * @v: pointer of type atomic_t
 *
 * Atomically reads the value of @v.
 */
#define atomic_read(v)    (*(volatile int *)&(v)->counter)

/**
 * atomic_set - set atomic variable
 * @v: pointer of type atomic_t
 * @i: required value
 *
 * Atomically sets the value of @v to @i.
 */
#define atomic_set(v, i) (((v)->counter) = (i))

#include <linux/irqflags.h>
#include <asm/system.h>

/**
 * atomic_add_return - add integer to atomic variable
 * @i: integer value to add
 * @v: pointer of type atomic_t
 *
 * Atomically adds @i to @v and returns the result
 */
static inline int atomic_add_return(int i, atomic_t *v)
{
    unsigned long flags;
    int temp;

    raw_local_irq_save(flags); /* Don't trace it in an irqsoff handler */
    temp = v->counter;
    temp += i;
    v->counter = temp;
    raw_local_irq_restore(flags);

    return temp;
}

/**
 * atomic_sub_return - subtract integer from atomic variable
 * @i: integer value to subtract
 * @v: pointer of type atomic_t
 *
 * Atomically subtracts @i from @v and returns the result
 */
static inline int atomic_sub_return(int i, atomic_t *v)
{
    unsigned long flags;
    int temp;

    raw_local_irq_save(flags); /* Don't trace it in an irqsoff handler */
    temp = v->counter;
    temp -= i;
    v->counter = temp;
    raw_local_irq_restore(flags);

    return temp;
}

static inline int atomic_add_negative(int i, atomic_t *v)
{
    return atomic_add_return(i, v) < 0;
}

static inline void atomic_add(int i, atomic_t *v)
{
    atomic_add_return(i, v);
}

static inline void atomic_sub(int i, atomic_t *v)
{
    atomic_sub_return(i, v);
}

static inline void atomic_inc(atomic_t *v)
{
    atomic_add_return(1, v);
}

static inline void atomic_dec(atomic_t *v)
{
    atomic_sub_return(1, v);
}

#define atomic_dec_return(v)        atomic_sub_return(1, (v))
#define atomic_inc_return(v)        atomic_add_return(1, (v))

#define atomic_sub_and_test(i, v)    (atomic_sub_return((i), (v)) == 0)
#define atomic_dec_and_test(v)        (atomic_sub_return(1, (v)) == 0)
#define atomic_inc_and_test(v)        (atomic_add_return(1, (v)) == 0)

#define atomic_xchg(ptr, v)        (xchg(&(ptr)->counter, (v)))
#define atomic_cmpxchg(v, old, new)    (cmpxchg(&((v)->counter), (old), (new)))

#define cmpxchg_local(ptr, o, n)                             \
    ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
            (unsigned long)(n), sizeof(*(ptr))))

#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))

static inline int atomic_add_unless(atomic_t *v, int a, int u)
{
  int c, old;
  c = atomic_read(v);
  while (c != u && (old = atomic_cmpxchg(v, c, c + a)) != c)
    c = old;
  return c != u;
}

#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)

static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
{
    unsigned long flags;

    mask = ~mask;
    raw_local_irq_save(flags); /* Don't trace it in a irqsoff handler */
    *addr &= mask;
    raw_local_irq_restore(flags);
}

/* Assume that atomic operations are already serializing */
#define smp_mb__before_atomic_dec()    barrier()
#define smp_mb__after_atomic_dec()    barrier()
#define smp_mb__before_atomic_inc()    barrier()
#define smp_mb__after_atomic_inc()    barrier()

#include <asm-generic/atomic-long.h>

#endif /* __KERNEL__ */
#endif /* __ASM_GENERIC_ATOMIC_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.4855 seconds