[runtime] Initialize the class name cache using double checked locking.
[mono.git] / mono / io-layer / thread-private.h
index bae837eadce0a228af461b27dfa0dd0b15eee9a3..3ea1af1197884f7efaa31af5c52d7e52b970c7d5 100644 (file)
 
 #include <config.h>
 #include <glib.h>
+#include <pthread.h>
+#include <mono/utils/mono-semaphore.h>
 
-#include <mono/io-layer/timed-thread.h>
+/* There doesn't seem to be a defined symbol for this */
+#define _WAPI_THREAD_CURRENT (gpointer)0xFFFFFFFE
 
 extern struct _WapiHandleOps _wapi_thread_ops;
 
-typedef enum {
-       THREAD_STATE_START,
-       THREAD_STATE_EXITED
-} WapiThreadState;
-
 struct _WapiHandle_thread
 {
-       WapiThreadState state;
-       guint32 exitstatus;
-       pid_t owner_pid;
-       TimedThread *thread;
-       gboolean joined;
+       pthread_t id;
+       GPtrArray *owned_mutexes;
 };
 
-extern gboolean _wapi_thread_apc_pending (gpointer handle);
-extern gboolean _wapi_thread_cur_apc_pending (void);
-extern gboolean _wapi_thread_dispatch_apc_queue (gpointer handle);
+typedef struct _WapiHandle_thread WapiHandle_thread;
 
+extern gboolean _wapi_thread_cur_apc_pending (void);
+extern void _wapi_thread_own_mutex (gpointer mutex);
+extern void _wapi_thread_disown_mutex (gpointer mutex);
+extern void _wapi_thread_cleanup (void);
 
 #endif /* _WAPI_THREAD_PRIVATE_H_ */