5 #ifndef _MONO_METADATA_THREADPOOL_H_
6 #define _MONO_METADATA_THREADPOOL_H_
11 #include <mono/metadata/exception.h>
12 #include <mono/metadata/object-internals.h>
14 typedef struct _MonoNativeOverlapped MonoNativeOverlapped;
17 mono_threadpool_cleanup (void);
20 mono_threadpool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error);
22 mono_threadpool_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error);
25 mono_threadpool_remove_domain_jobs (MonoDomain *domain, int timeout);
28 mono_threadpool_suspend (void);
30 mono_threadpool_resume (void);
33 ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
35 ves_icall_System_Threading_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
37 ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads);
39 ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
41 ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads);
43 ves_icall_System_Threading_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking);
45 ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete (void);
47 ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative (void);
49 ves_icall_System_Threading_ThreadPool_ReportThreadStatus (MonoBoolean is_working);
51 ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void);
54 ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped);
57 ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle);
60 ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted (void);
65 mono_threadpool_enqueue_work_item (MonoDomain *domain, MonoObject *work_item, MonoError *error);
67 #endif // _MONO_METADATA_THREADPOOL_H_