summaryrefslogtreecommitdiff
path: root/implement.h
diff options
context:
space:
mode:
Diffstat (limited to 'implement.h')
-rw-r--r--implement.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/implement.h b/implement.h
index ea68d2f..14fbdbb 100644
--- a/implement.h
+++ b/implement.h
@@ -51,13 +51,6 @@ struct _pthread_threads_thread {
pthread_t thread;
pthread_attr_t attr;
_pthread_call_t call;
- enum {
- _PTHREAD_CLEANUP_STACK,
- _PTHREAD_DESTRUCTOR_STACK,
- _PTHREAD_FORKPREPARE_STACK,
- _PTHREAD_FORKPARENT_STACK,
- _PTHREAD_FORKCHILD_STACK
- };
_pthread_handler_node_t * cleanupstack;
_pthread_handler_node_t * destructorstack;
_pthread_handler_node_t * forkpreparestack;
@@ -69,6 +62,19 @@ struct _pthread_threads_thread {
extern "C" {
#endif /* __cplusplus */
+/* Generic handler push and pop routines. */
+
+void _pthread_handler_push(_pthread_handler_node_t ** stacktop,
+ int poporder,
+ void (*routine)(void *),
+ void *arg);
+
+void _pthread_handler_pop(_pthread_handler_node_t ** stacktop,
+ int execute);
+
+void _pthread_handler_pop_all(_pthread_handler_node_t ** stacktop,
+ int execute);
+
/* Primitives to manage threads table entries. */
int _pthread_new_thread_entry(pthread_t thread,
@@ -87,6 +93,18 @@ void _pthread_vacuum(void);
#endif /* __cplusplus */
-#endif /* _IMPLEMENT_H */
+/* Global data declared in global.c */
+
+extern pthread_mutex_t _pthread_count_mutex;
+extern DWORD _pthread_threads_count;
+
+extern _pthread_threads_thread_t _pthread_threads_table[];
+
+extern unsigned short _pthread_once_flag;
+
+extern pthread_mutex_t _pthread_once_lock;
+
+
+#endif /* _IMPLEMENT_H */