diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2022-02-18 09:22:42 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2022-02-18 09:22:42 +0300 |
commit | 538b980ef03a3946e616c0559c425f07a7e865e3 (patch) | |
tree | b0585b7bfb42b44a7a9db75add42738068536a62 | |
parent | 1e82bcffac6378e34c40bea98aecadc57aa8fa4e (diff) | |
download | libatomic_ops-538b980ef03a3946e616c0559c425f07a7e865e3.tar.gz |
Rename AO_real_head/next_ptr to AO_stack_head/next_ptr
(fix of commit d29c0910d)
* src/atomic_ops_stack.c (AO_real_head_ptr): Rename to
AO_stack_head_ptr.
* src/atomic_ops_stack.h (AO_real_head_ptr): Likewise.
* src/atomic_ops_stack.c (AO_real_next_ptr): Rename to
AO_stack_next_ptr.
* src/atomic_ops_stack.h (AO_real_next_ptr): Likewise.
* src/atomic_ops_stack.h [!AO_REAL_PTR_AS_MACRO] (AO_REAL_NEXT_PTR,
AO_REAL_HEAD_PTR): Rename AO_real_head_ptr and AO_real_next_ptr to
AO_stack_head_ptr and AO_stack_next_ptr, respectively.
-rw-r--r-- | src/atomic_ops_stack.c | 4 | ||||
-rw-r--r-- | src/atomic_ops_stack.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/atomic_ops_stack.c b/src/atomic_ops_stack.c index e4a4fdc..eae78c1 100644 --- a/src/atomic_ops_stack.c +++ b/src/atomic_ops_stack.c @@ -44,12 +44,12 @@ AO_API int AO_stack_is_lock_free(void) # endif } -AO_API AO_t *AO_real_head_ptr(const AO_stack_t *list) +AO_API AO_t *AO_stack_head_ptr(const AO_stack_t *list) { return AO_REAL_HEAD_PTR(*list); } -AO_API AO_t *AO_real_next_ptr(AO_t next) +AO_API AO_t *AO_stack_next_ptr(AO_t next) { return AO_REAL_NEXT_PTR(next); } diff --git a/src/atomic_ops_stack.h b/src/atomic_ops_stack.h index c92752c..187f9b1 100644 --- a/src/atomic_ops_stack.h +++ b/src/atomic_ops_stack.h @@ -141,11 +141,11 @@ typedef union AO__stack { /* necessarily a real pointer. This converts the AO_t to a */ /* real (AO_t *) which is either NULL, or points at the link */ /* field in the next node. */ -# define AO_REAL_NEXT_PTR(x) AO_real_next_ptr(x) +# define AO_REAL_NEXT_PTR(x) AO_stack_next_ptr(x) /* Convert an AO_stack_t to a pointer to the link field in */ /* the first element. */ -# define AO_REAL_HEAD_PTR(x) AO_real_head_ptr(&(x)) +# define AO_REAL_HEAD_PTR(x) AO_stack_head_ptr(&(x)) #elif defined(AO_USE_ALMOST_LOCK_FREE) # define AO_REAL_NEXT_PTR(x) (AO_t *)((x) & ~AO_BIT_MASK) @@ -170,8 +170,8 @@ AO_API AO_t *AO_stack_pop_acquire(AO_stack_t *list); AO_API void AO_stack_init(AO_stack_t *list); AO_API int AO_stack_is_lock_free(void); -AO_API AO_t *AO_real_head_ptr(const AO_stack_t *list); -AO_API AO_t *AO_real_next_ptr(AO_t /* next */); +AO_API AO_t *AO_stack_head_ptr(const AO_stack_t *list); +AO_API AO_t *AO_stack_next_ptr(AO_t /* next */); #ifdef __cplusplus } /* extern "C" */ |