X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fthreadpool.h;h=81cea4ce1d4949a0ada48859baefa11d61124ccb;hb=b9e97c9957ceb5a04ab1a43da3074646b196e946;hp=4c5983f77c9b62cf18ef91e7f79f103b8af8c58d;hpb=89d0ba3968d36576553e0f483b0c69465f94e8ae;p=mono.git diff --git a/mono/metadata/threadpool.h b/mono/metadata/threadpool.h index 4c5983f77c9..81cea4ce1d4 100644 --- a/mono/metadata/threadpool.h +++ b/mono/metadata/threadpool.h @@ -3,34 +3,54 @@ #include #include +#include /* No managed code here */ -void mono_thread_pool_init (void); +void mono_thread_pool_init (void) MONO_INTERNAL; +void mono_thread_pool_init_tls (void) MONO_INTERNAL; +void icall_append_job (MonoObject *ar) MONO_INTERNAL; +void icall_append_io_job (MonoObject *target, MonoSocketAsyncResult *state) MONO_INTERNAL; MonoAsyncResult * mono_thread_pool_add (MonoObject *target, MonoMethodMessage *msg, - MonoDelegate *async_callback, MonoObject *state); + MonoDelegate *async_callback, MonoObject *state) MONO_INTERNAL; MonoObject * mono_thread_pool_finish (MonoAsyncResult *ares, MonoArray **out_args, - MonoObject **exc); + MonoObject **exc) MONO_INTERNAL; -void mono_thread_pool_cleanup (void); +void mono_thread_pool_cleanup (void) MONO_INTERNAL; + +gboolean mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout) MONO_INTERNAL; + +void mono_thread_pool_suspend (void) MONO_INTERNAL; +void mono_thread_pool_resume (void) MONO_INTERNAL; void ves_icall_System_Threading_ThreadPool_GetAvailableThreads (int *workerThreads, - int *completionPortThreads); + int *completionPortThreads) MONO_INTERNAL; void ves_icall_System_Threading_ThreadPool_GetMaxThreads (int *workerThreads, - int *completionPortThreads); + int *completionPortThreads) MONO_INTERNAL; void ves_icall_System_Threading_ThreadPool_GetMinThreads (gint *workerThreads, - gint *completionPortThreads); + gint *completionPortThreads) MONO_INTERNAL; MonoBoolean ves_icall_System_Threading_ThreadPool_SetMinThreads (gint workerThreads, - gint completionPortThreads); + gint completionPortThreads) MONO_INTERNAL; + +MonoBoolean +ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads, + gint completionPortThreads) MONO_INTERNAL; + +typedef void (*MonoThreadPoolFunc) (gpointer user_data); +MONO_API void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data); + +typedef void (*MonoThreadPoolItemFunc) (gpointer user_data); +MONO_API void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data); #endif +