X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmetadata%2Fthreadpool.h;h=91b404fe275d4a8a981b099d2f7b428c40341c9b;hb=HEAD;hp=8bcb834af7491430a1a92c126879d885834e3b86;hpb=edc181c514ddc082ce44cde69f2272a12e942b88;p=mono.git diff --git a/mono/metadata/threadpool.h b/mono/metadata/threadpool.h index 8bcb834af74..91b404fe275 100644 --- a/mono/metadata/threadpool.h +++ b/mono/metadata/threadpool.h @@ -1,55 +1,67 @@ -#ifndef _MONO_THREADPOOL_H_ -#define _MONO_THREADPOOL_H_ +/** + * \file + */ -#include -#include -#include +#ifndef _MONO_METADATA_THREADPOOL_H_ +#define _MONO_METADATA_THREADPOOL_H_ -/* No managed code here */ -void mono_thread_pool_init (void) MONO_INTERNAL; +#include +#include -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) MONO_INTERNAL; +#include +#include -MonoObject * -mono_thread_pool_finish (MonoAsyncResult *ares, MonoArray **out_args, - MonoObject **exc) MONO_INTERNAL; +typedef struct _MonoNativeOverlapped MonoNativeOverlapped; -void mono_thread_pool_cleanup (void) MONO_INTERNAL; +void +mono_threadpool_cleanup (void); -gboolean mono_thread_pool_remove_domain_jobs (MonoDomain *domain, int timeout) MONO_INTERNAL; +MonoAsyncResult * +mono_threadpool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error); +MonoObject * +mono_threadpool_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error); -void mono_thread_pool_suspend (void) MONO_INTERNAL; -void mono_thread_pool_resume (void) MONO_INTERNAL; +gboolean +mono_threadpool_remove_domain_jobs (MonoDomain *domain, int timeout); void -ves_icall_System_Threading_ThreadPool_GetAvailableThreads (int *workerThreads, - int *completionPortThreads) MONO_INTERNAL; - +mono_threadpool_suspend (void); void -ves_icall_System_Threading_ThreadPool_GetMaxThreads (int *workerThreads, - int *completionPortThreads) MONO_INTERNAL; +mono_threadpool_resume (void); void -ves_icall_System_Threading_ThreadPool_GetMinThreads (gint *workerThreads, - gint *completionPortThreads) MONO_INTERNAL; +ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads); +void +ves_icall_System_Threading_ThreadPool_GetMinThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads); +void +ves_icall_System_Threading_ThreadPool_GetMaxThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads); +MonoBoolean +ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads, gint32 completion_port_threads); +MonoBoolean +ves_icall_System_Threading_ThreadPool_SetMaxThreadsNative (gint32 worker_threads, gint32 completion_port_threads); +void +ves_icall_System_Threading_ThreadPool_InitializeVMTp (MonoBoolean *enable_worker_tracking); +MonoBoolean +ves_icall_System_Threading_ThreadPool_NotifyWorkItemComplete (void); +void +ves_icall_System_Threading_ThreadPool_NotifyWorkItemProgressNative (void); +void +ves_icall_System_Threading_ThreadPool_ReportThreadStatus (MonoBoolean is_working); +MonoBoolean +ves_icall_System_Threading_ThreadPool_RequestWorkerThread (void); MonoBoolean -ves_icall_System_Threading_ThreadPool_SetMinThreads (gint workerThreads, - gint completionPortThreads) MONO_INTERNAL; +ves_icall_System_Threading_ThreadPool_PostQueuedCompletionStatus (MonoNativeOverlapped *native_overlapped); MonoBoolean -ves_icall_System_Threading_ThreadPool_SetMaxThreads (gint workerThreads, - gint completionPortThreads) MONO_INTERNAL; +ves_icall_System_Threading_ThreadPool_BindIOCompletionCallbackNative (gpointer file_handle); -typedef void (*MonoThreadPoolFunc) (gpointer user_data); -void mono_install_threadpool_thread_hooks (MonoThreadPoolFunc start_func, MonoThreadPoolFunc finish_func, gpointer user_data); +MonoBoolean +ves_icall_System_Threading_ThreadPool_IsThreadPoolHosted (void); -typedef void (*MonoThreadPoolItemFunc) (gpointer user_data); -void mono_install_threadpool_item_hooks (MonoThreadPoolItemFunc begin_func, MonoThreadPoolItemFunc end_func, gpointer user_data); +/* Internals */ -#endif +gboolean +mono_threadpool_enqueue_work_item (MonoDomain *domain, MonoObject *work_item, MonoError *error); +#endif // _MONO_METADATA_THREADPOOL_H_