!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.4.18 (Ubuntu). PHP/7.0.33-0ubuntu0.16.04.16 

uname -a: Linux digifus 3.13.0-57-generic #95-Ubuntu SMP Fri Jun 19 09:28:15 UTC 2015 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/usr/src/linux-headers-4.4.0-210/arch/h8300/include/asm/   drwxr-xr-x
Free 9.44 GB of 29.4 GB (32.1%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     atomic.h (2.09 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#ifndef __ARCH_H8300_ATOMIC__
#define __ARCH_H8300_ATOMIC__

#include <linux/types.h>
#include <asm/cmpxchg.h>

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

#define ATOMIC_INIT(i)    { (i) }

#define atomic_read(v)        READ_ONCE((v)->counter)
#define atomic_set(v, i)    WRITE_ONCE(((v)->counter), (i))

#include <linux/kernel.h>

#define ATOMIC_OP_RETURN(op, c_op)                \
static inline int atomic_##op##_return(int i, atomic_t *v)    \
{                                \
    h8300flags flags;                    \
    int ret;                        \
                                \
    flags = arch_local_irq_save();                \
    ret = v->counter c_op i;                \
    arch_local_irq_restore(flags);                \
    return ret;                        \
}

#define ATOMIC_OP(op, c_op)                    \
static inline void atomic_##op(int i, atomic_t *v)        \
{                                \
    h8300flags flags;                    \
                                \
    flags = arch_local_irq_save();                \
    v->counter c_op i;                    \
    arch_local_irq_restore(flags);                \
}

ATOMIC_OP_RETURN(add, +=)
ATOMIC_OP_RETURN(sub, -=)

ATOMIC_OP(and, &=)
ATOMIC_OP(or,  |=)
ATOMIC_OP(xor, ^=)

#undef ATOMIC_OP_RETURN
#undef ATOMIC_OP

#define atomic_add(i, v)        (void)atomic_add_return(i, v)
#define atomic_add_negative(a, v)    (atomic_add_return((a), (v)) < 0)

#define atomic_sub(i, v)        (void)atomic_sub_return(i, v)
#define atomic_sub_and_test(i, v)    (atomic_sub_return(i, v) == 0)

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

#define atomic_inc(v)            (void)atomic_inc_return(v)
#define atomic_inc_and_test(v)        (atomic_inc_return(v) == 0)

#define atomic_dec(v)            (void)atomic_dec_return(v)
#define atomic_dec_and_test(v)        (atomic_dec_return(v) == 0)

static inline int atomic_cmpxchg(atomic_t *v, int old, int new)
{
    int ret;
    h8300flags flags;

    flags = arch_local_irq_save();
    ret = v->counter;
    if (likely(ret == old))
        v->counter = new;
    arch_local_irq_restore(flags);
    return ret;
}

static inline int __atomic_add_unless(atomic_t *v, int a, int u)
{
    int ret;
    h8300flags flags;

    flags = arch_local_irq_save();
    ret = v->counter;
    if (ret != u)
        v->counter += a;
    arch_local_irq_restore(flags);
    return ret;
}

#endif /* __ARCH_H8300_ATOMIC __ */

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by KaizenLouie | C99Shell Github | Generation time: 0.0048 ]--