X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=mono%2Fmetadata%2Fthreadpool.h;h=c860b7ebfca3face33fa6e8292aab026fc691878;hb=a9758cde9e089e26fdbedf7599d8d377b05eb929;hp=1b79ee02942a83309ffa96b92fe5c6d5c1de5b06;hpb=4b20312cfb08cf52fc84c25a7548b0f60ac5eed5;p=mono.git diff --git a/mono/metadata/threadpool.h b/mono/metadata/threadpool.h index 1b79ee02942..c860b7ebfca 100644 --- a/mono/metadata/threadpool.h +++ b/mono/metadata/threadpool.h @@ -1,38 +1,52 @@ #ifndef _MONO_THREADPOOL_H_ #define _MONO_THREADPOOL_H_ -#include +#include #include +#include -extern int mono_max_worker_threads; +/* No managed code here */ +void mono_thread_pool_init (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 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_BindHandle (gpointer handle); +ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads, + gint completionPortThreads) MONO_INTERNAL; + +typedef void (*MonoThreadPoolFunc) (gpointer user_data); +void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data); + +typedef void (*MonoThreadPoolItemFunc) (gpointer user_data); +void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data); #endif +