[runtime] Fix "make distcheck"
[mono-project.git] / mono / io-layer / threads.h
blobd2dbcbfaf1cd0944af16160cf53f03953d87ca74
1 /*
2 * threads.h: Thread handles
4 * Author:
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
8 */
10 #ifndef _WAPI_THREADS_H_
11 #define _WAPI_THREADS_H_
13 #include <glib.h>
15 #include <mono/io-layer/handles.h>
16 #include <mono/io-layer/io.h>
17 #include <mono/io-layer/status.h>
18 #include <mono/io-layer/processes.h>
19 #include <mono/io-layer/access.h>
21 G_BEGIN_DECLS
23 #define STILL_ACTIVE STATUS_PENDING
25 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
27 typedef guint32 (*WapiThreadStart)(gpointer);
29 extern gsize GetCurrentThreadId(void); /* NB return is 32bit in MS API */
30 extern void Sleep(guint32 ms);
31 extern guint32 SleepEx(guint32 ms, gboolean alertable);
33 void wapi_interrupt_thread (gpointer handle);
34 void wapi_clear_interruption (void);
35 gboolean wapi_thread_set_wait_handle (gpointer handle);
36 void wapi_thread_clear_wait_handle (gpointer handle);
37 void wapi_self_interrupt (void);
39 gpointer wapi_prepare_interrupt_thread (gpointer thread_handle);
40 void wapi_finish_interrupt_thread (gpointer wait_handle);
42 gpointer wapi_create_thread_handle (void);
43 void wapi_thread_handle_set_exited (gpointer handle, guint32 exitstatus);
44 void wapi_ref_thread_handle (gpointer handle);
45 gpointer wapi_get_current_thread_handle (void);
47 char* wapi_current_thread_desc (void);
49 G_END_DECLS
50 #endif /* _WAPI_THREADS_H_ */