php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
zend_atomic.h File Reference
#include "zend_portability.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  zend_atomic_bool_s
 
struct  zend_atomic_int_s
 

Macros

#define ZEND_GCC_PREREQ(x, y)
 
#define HAVE_NO_ATOMICS   1
 
#define ZEND_ATOMIC_BOOL_INIT(obj, desired)
 
#define ZEND_ATOMIC_INT_INIT(obj, desired)
 
#define ZEND_ATOMIC_BOOL_INITIALIZER(desired)
 
#define ZEND_ATOMIC_INT_INITIALIZER(desired)
 

Typedefs

typedef struct zend_atomic_bool_s zend_atomic_bool
 
typedef struct zend_atomic_int_s zend_atomic_int
 

Functions

ZEND_API void zend_atomic_bool_init (zend_atomic_bool *obj, bool desired)
 
ZEND_API void zend_atomic_int_init (zend_atomic_int *obj, int desired)
 
ZEND_API bool zend_atomic_bool_exchange (zend_atomic_bool *obj, bool desired)
 
ZEND_API int zend_atomic_int_exchange (zend_atomic_int *obj, int desired)
 
ZEND_API bool zend_atomic_bool_compare_exchange (zend_atomic_bool *obj, bool *expected, bool desired)
 
ZEND_API bool zend_atomic_int_compare_exchange (zend_atomic_int *obj, int *expected, int desired)
 
ZEND_API void zend_atomic_bool_store (zend_atomic_bool *obj, bool desired)
 
ZEND_API void zend_atomic_int_store (zend_atomic_int *obj, int desired)
 
ZEND_API bool zend_atomic_bool_load (const zend_atomic_bool *obj)
 
ZEND_API int zend_atomic_int_load (const zend_atomic_int *obj)
 

Macro Definition Documentation

◆ HAVE_NO_ATOMICS

#define HAVE_NO_ATOMICS   1

Definition at line 33 of file zend_atomic.h.

◆ ZEND_ATOMIC_BOOL_INIT

#define ZEND_ATOMIC_BOOL_INIT ( obj,
desired )
Value:
((obj)->value = (desired))

Definition at line 309 of file zend_atomic.h.

◆ ZEND_ATOMIC_BOOL_INITIALIZER

#define ZEND_ATOMIC_BOOL_INITIALIZER ( desired)
Value:
{.value = (desired)}

Definition at line 312 of file zend_atomic.h.

◆ ZEND_ATOMIC_INT_INIT

#define ZEND_ATOMIC_INT_INIT ( obj,
desired )
Value:
((obj)->value = (desired))

Definition at line 310 of file zend_atomic.h.

◆ ZEND_ATOMIC_INT_INITIALIZER

#define ZEND_ATOMIC_INT_INITIALIZER ( desired)
Value:
{.value = (desired)}

Definition at line 313 of file zend_atomic.h.

◆ ZEND_GCC_PREREQ

#define ZEND_GCC_PREREQ ( x,
y )
Value:
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x)))

Definition at line 22 of file zend_atomic.h.

Typedef Documentation

◆ zend_atomic_bool

◆ zend_atomic_int

Function Documentation

◆ zend_atomic_bool_compare_exchange()

ZEND_API bool zend_atomic_bool_compare_exchange ( zend_atomic_bool * obj,
bool * expected,
bool desired )

Definition at line 42 of file zend_atomic.c.

◆ zend_atomic_bool_exchange()

ZEND_API bool zend_atomic_bool_exchange ( zend_atomic_bool * obj,
bool desired )

Definition at line 34 of file zend_atomic.c.

◆ zend_atomic_bool_init()

ZEND_API void zend_atomic_bool_init ( zend_atomic_bool * obj,
bool desired )

Definition at line 26 of file zend_atomic.c.

◆ zend_atomic_bool_load()

ZEND_API bool zend_atomic_bool_load ( const zend_atomic_bool * obj)

Definition at line 69 of file zend_atomic.c.

◆ zend_atomic_bool_store()

ZEND_API void zend_atomic_bool_store ( zend_atomic_bool * obj,
bool desired )

Definition at line 52 of file zend_atomic.c.

◆ zend_atomic_int_compare_exchange()

ZEND_API bool zend_atomic_int_compare_exchange ( zend_atomic_int * obj,
int * expected,
int desired )

Definition at line 47 of file zend_atomic.c.

◆ zend_atomic_int_exchange()

ZEND_API int zend_atomic_int_exchange ( zend_atomic_int * obj,
int desired )

Definition at line 38 of file zend_atomic.c.

◆ zend_atomic_int_init()

ZEND_API void zend_atomic_int_init ( zend_atomic_int * obj,
int desired )

Definition at line 30 of file zend_atomic.c.

◆ zend_atomic_int_load()

ZEND_API int zend_atomic_int_load ( const zend_atomic_int * obj)

Definition at line 72 of file zend_atomic.c.

◆ zend_atomic_int_store()

ZEND_API void zend_atomic_int_store ( zend_atomic_int * obj,
int desired )

Definition at line 56 of file zend_atomic.c.