summaryrefslogtreecommitdiff
path: root/sysdeps/generic/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/tls.h')
-rw-r--r--sysdeps/generic/tls.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/sysdeps/generic/tls.h b/sysdeps/generic/tls.h
index 5126a50198..7ad6438caa 100644
--- a/sysdeps/generic/tls.h
+++ b/sysdeps/generic/tls.h
@@ -71,4 +71,29 @@
This macro returns the address of the DTV of the current thread.
This normally is done using the thread register which points
to the dtv or the TCB (from which the DTV can found).
+
+
+ THREAD_GSCOPE_SET_FLAG()
+
+ This marks the current thread as currently using the global scope, and acts
+ as an acquisition memory barrier.
+
+ THREAD_GSCOPE_RESET_FLAG()
+
+ This marks the current thread as not using the global scope any more, and
+ acts as a release memory barrier before notifying THREAD_GSCOPE_WAIT().
+
+
+ THREAD_GSCOPE_WAIT()
+
+ This waits for all threads using the global scope at the moment of call to
+ stop using it, i.e. this should wait for all threads which have already
+ called THREAD_GSCOPE_SET_FLAG() to call THREAD_GSCOPE_RESET_FLAG(). This
+ also acts as a write memory barrier before waiting.
+
+
+ THREAD_GSCOPE_IN_TCB
+
+ This should be set to 1 if the global scope flag is stored within the TCB.
+ When set to 0, GL(_dl_thread_gscope_count) will be defined to store it.
*/