summaryrefslogtreecommitdiff
path: root/src/atomic_ops_stack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atomic_ops_stack.c')
-rw-r--r--src/atomic_ops_stack.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/atomic_ops_stack.c b/src/atomic_ops_stack.c
index 0f23fdf..364f84c 100644
--- a/src/atomic_ops_stack.c
+++ b/src/atomic_ops_stack.c
@@ -23,6 +23,10 @@
# define AO_BUILD
#endif
+#ifndef AO_REAL_PTR_AS_MACRO
+# define AO_REAL_PTR_AS_MACRO
+#endif
+
#define AO_REQUIRE_CAS
#include "atomic_ops_stack.h"
@@ -31,6 +35,16 @@ AO_API void AO_stack_init(AO_stack_t *list)
memset((char *)list, 0, sizeof(list));
}
+AO_API AO_t *AO_real_head_ptr(const AO_stack_t *list)
+{
+ return AO_REAL_HEAD_PTR(*list);
+}
+
+AO_API AO_t *AO_real_next_ptr(AO_t next)
+{
+ return AO_REAL_NEXT_PTR(next);
+}
+
/* This function call must be a part of a do-while loop with a CAS */
/* designating the condition of the loop (see the use cases below). */
#ifdef AO_THREAD_SANITIZER