1 #ifndef _MONO_THREADPOOL_H_
2 #define _MONO_THREADPOOL_H_
4 #include <mono/metadata/object-internals.h>
5 #include <mono/metadata/reflection.h>
7 /* No managed code here */
8 void mono_thread_pool_init (void) MONO_INTERNAL;
10 void icall_append_job (MonoObject *ar) MONO_INTERNAL;
12 mono_thread_pool_add (MonoObject *target, MonoMethodMessage *msg,
13 MonoDelegate *async_callback, MonoObject *state) MONO_INTERNAL;
16 mono_thread_pool_finish (MonoAsyncResult *ares, MonoArray **out_args,
17 MonoObject **exc) MONO_INTERNAL;
19 void mono_thread_pool_cleanup (void) MONO_INTERNAL;
21 gboolean mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout) MONO_INTERNAL;
24 ves_icall_System_Threading_ThreadPool_GetAvailableThreads (int *workerThreads,
25 int *completionPortThreads) MONO_INTERNAL;
28 ves_icall_System_Threading_ThreadPool_GetMaxThreads (int *workerThreads,
29 int *completionPortThreads) MONO_INTERNAL;
32 ves_icall_System_Threading_ThreadPool_GetMinThreads (gint *workerThreads,
33 gint *completionPortThreads) MONO_INTERNAL;
36 ves_icall_System_Threading_ThreadPool_SetMinThreads (gint workerThreads,
37 gint completionPortThreads) MONO_INTERNAL;
40 ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads,
41 gint completionPortThreads) MONO_INTERNAL;
43 typedef void (*MonoThreadPoolFunc) (gpointer user_data);
44 void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data);
46 typedef void (*MonoThreadPoolItemFunc) (gpointer user_data);
47 void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data);