summaryrefslogtreecommitdiff
path: root/pthread/pt-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'pthread/pt-internal.h')
-rw-r--r--pthread/pt-internal.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/pthread/pt-internal.h b/pthread/pt-internal.h
index e7c85fd..9eb84ed 100644
--- a/pthread/pt-internal.h
+++ b/pthread/pt-internal.h
@@ -26,13 +26,15 @@
#include <signal.h>
#include <assert.h>
-#include <bits/atomic.h>
+#include <atomic.h>
#include <pt-key.h>
#include <pt-sysdep.h>
#include <pt-machdep.h>
+#include <sig-internal.h>
+
/* Thread state. */
enum pthread_state
{
@@ -50,6 +52,10 @@ enum pthread_state
# define PTHREAD_SYSDEP_MEMBERS
#endif
+#ifndef PTHREAD_SIGNAL_MEMBERS
+# define PTHREAD_SIGNAL_MEMBERS
+#endif
+
/* This structure describes a POSIX thread. */
struct __pthread
{
@@ -85,6 +91,8 @@ struct __pthread
PTHREAD_SYSDEP_MEMBERS
+ PTHREAD_SIGNAL_MEMBERS
+
struct __pthread *next, **prevp;
};
@@ -132,7 +140,7 @@ __pthread_dequeue (struct __pthread *thread)
)
/* The total number of threads currently active. */
-extern __atomic_t __pthread_total;
+extern atomic_fast32_t __pthread_total;
/* The total number of thread IDs currently in use, or on the list of
available thread IDs. */
@@ -225,6 +233,10 @@ extern void __pthread_thread_halt (struct __pthread *thread,
int need_dealloc);
+/* Called by a thread just before it calls the provided start
+ routine. */
+extern void __pthread_startup (void);
+
/* Block THREAD. */
extern void __pthread_block (struct __pthread *thread);