1 #ifndef _MONO_THREADPOOL_MICROSOFT_H_
2 #define _MONO_THREADPOOL_MICROSOFT_H_
7 #include <mono/metadata/exception.h>
8 #include <mono/metadata/object-internals.h>
10 #define SMALL_STACK (sizeof (gpointer) * 32 * 1024)
13 STATUS_NOT_INITIALIZED,
20 typedef struct _MonoNativeOverlapped MonoNativeOverlapped;
23 mono_threadpool_ms_cleanup (void);
26 mono_threadpool_ms_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params);
28 mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc);
31 mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout);
34 mono_threadpool_ms_suspend (void);
36 mono_threadpool_ms_resume (void);
39 ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
41 ves_icall_System_Threading_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
43 ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
45 ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
47 ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
49 ves_icall_System_Threading_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking);
51 ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete (void);
53 ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative (void);
55 ves_icall_System_Threading_ThreadPool_ReportThreadStatus (MonoBoolean is_working);
57 ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void);
60 ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped);
63 ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle);
66 ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted (void);
71 mono_threadpool_ms_enqueue_work_item (MonoDomain *domain, MonoObject *work_item);
73 #endif // _MONO_THREADPOOL_MICROSOFT_H_