[threadpool] Move threadpool-microsoft.{c,h} to threadpool-ms.{c,h}
[mono.git] / mono / metadata / threadpool-ms.h
1 #ifndef _MONO_THREADPOOL_MICROSOFT_H_
2 #define _MONO_THREADPOOL_MICROSOFT_H_
3
4 #include <glib.h>
5
6 typedef struct _MonoRuntimeWorkItem MonoRuntimeWorkItem;
7 typedef struct _MonoNativeOverlapped MonoNativeOverlapped;
8
9 static void
10 mono_thread_pool_ms_init (void)
11 {
12         /* Initialization is done lazily */
13 }
14
15 static void
16 mono_thread_pool_ms_init_tls (void)
17 {
18         /* The WSQ is now implemented in managed */
19 }
20
21 void
22 mono_thread_pool_ms_cleanup (void);
23
24 MonoAsyncResult *
25 mono_thread_pool_ms_add (MonoObject *target, MonoMethodMessage *msg, MonoDelegate *async_callback, MonoObject *state);
26 MonoObject *
27 mono_thread_pool_ms_finish (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc);
28
29 gboolean
30 mono_thread_pool_ms_remove_domain_jobs (MonoDomain *domain, int timeout);
31 void
32 mono_thread_pool_ms_remove_socket (int sock);
33
34 void
35 mono_thread_pool_ms_suspend (void);
36 void
37 mono_thread_pool_ms_resume (void);
38
39 static gboolean
40 mono_thread_pool_ms_is_queue_array (MonoArray *arr)
41 {
42         /* The queue is in managed code */
43         return FALSE;
44 }
45
46 void
47 ves_icall_System_Threading_MonoRuntimeWorkItem_ExecuteWorkItem (MonoRuntimeWorkItem *rwi);
48
49 void
50 ves_icall_System_Threading_Microsoft_ThreadPool_GetAvailableThreadsNative (gint *worker_threads, gint *completion_port_threads);
51 void
52 ves_icall_System_Threading_Microsoft_ThreadPool_GetMinThreadsNative (gint *worker_threads, gint *completion_port_threads);
53 void
54 ves_icall_System_Threading_Microsoft_ThreadPool_GetMaxThreadsNative (gint *worker_threads, gint *completion_port_threads);
55 gboolean
56 ves_icall_System_Threading_Microsoft_ThreadPool_SetMinThreadsNative (gint worker_threads, gint completion_port_threads);
57 gboolean
58 ves_icall_System_Threading_Microsoft_ThreadPool_SetMaxThreadsNative (gint worker_threads, gint completion_port_threads);
59 void
60 ves_icall_System_Threading_Microsoft_ThreadPool_InitializeVMTp (gboolean *enable_worker_tracking);
61 gboolean
62 ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemComplete (void);
63 void
64 ves_icall_System_Threading_Microsoft_ThreadPool_NotifyWorkItemProgressNative (void);
65 void
66 ves_icall_System_Threading_Microsoft_ThreadPool_ReportThreadStatus (gboolean is_working);
67 gboolean
68 ves_icall_System_Threading_Microsoft_ThreadPool_RequestWorkerThread (void);
69 gboolean
70 ves_icall_System_Threading_Microsoft_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped);
71 gboolean
72 ves_icall_System_Threading_Microsoft_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle);
73
74 static gboolean
75 ves_icall_System_Threading_Microsoft_ThreadPool_IsThreadPoolHosted (void)
76 {
77         return FALSE;
78 }
79
80 #endif // _MONO_THREADPOOL_MICROSOFT_H_