[runtime] Fix "make distcheck"
[mono-project.git] / mono / io-layer / thread-private.h
blobe9f8f9c8813af499e66b6191b97b1c37e6c400c8
1 /*
2 * thread-private.h: Private definitions for thread handles
4 * Author:
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
8 */
10 #ifndef _WAPI_THREAD_PRIVATE_H_
11 #define _WAPI_THREAD_PRIVATE_H_
13 #include <config.h>
14 #include <glib.h>
15 #include <pthread.h>
16 #include <mono/utils/mono-semaphore.h>
18 /* There doesn't seem to be a defined symbol for this */
19 #define _WAPI_THREAD_CURRENT (gpointer)0xFFFFFFFE
21 extern struct _WapiHandleOps _wapi_thread_ops;
23 #define INTERRUPTION_REQUESTED_HANDLE (gpointer)0xFFFFFFFE
25 struct _WapiHandle_thread
27 pthread_t id;
28 GPtrArray *owned_mutexes;
29 /*
30 * Handle this thread waits on. If this is INTERRUPTION_REQUESTED_HANDLE,
31 * it means the thread is interrupted by another thread, and shouldn't enter
32 * a wait.
33 * This also acts as a reference for the handle.
35 gpointer wait_handle;
38 typedef struct _WapiHandle_thread WapiHandle_thread;
40 extern gboolean _wapi_thread_apc_pending (gpointer handle);
41 extern gboolean _wapi_thread_cur_apc_pending (void);
42 extern void _wapi_thread_own_mutex (gpointer mutex);
43 extern void _wapi_thread_disown_mutex (gpointer mutex);
44 extern void _wapi_thread_cleanup (void);
46 #endif /* _WAPI_THREAD_PRIVATE_H_ */