2 * threads.h: Thread handles
5 * Dick Porter (dick@ximian.com)
7 * (C) 2002 Ximian, Inc.
10 #ifndef _WAPI_THREADS_H_
11 #define _WAPI_THREADS_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>
23 #define STILL_ACTIVE STATUS_PENDING
25 #define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3ff)
27 typedef guint32 (*WapiThreadStart)(gpointer);
30 THREAD_PRIORITY_LOWEST = -2,
31 THREAD_PRIORITY_BELOW_NORMAL = -1,
32 THREAD_PRIORITY_NORMAL = 0,
33 THREAD_PRIORITY_ABOVE_NORMAL = 1,
34 THREAD_PRIORITY_HIGHEST = 2
37 gpointer wapi_create_thread_handle (void);
38 void wapi_thread_handle_set_exited (gpointer handle, guint32 exitstatus);
39 void wapi_ref_thread_handle (gpointer handle);
40 gpointer wapi_get_current_thread_handle (void);
42 char *wapi_current_thread_desc (void);
44 extern gint32 GetThreadPriority (gpointer handle);
45 extern gboolean SetThreadPriority (gpointer handle, gint32 priority);
47 extern int wapi_thread_priority_to_posix_priority (WapiThreadPriority, int);
48 extern void wapi_init_thread_info_priority (gpointer, gint32);
51 #endif /* _WAPI_THREADS_H_ */