00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00022 #ifndef GLOBUS_THREAD_COMMON_H
00023 #define GLOBUS_THREAD_COMMON_H
00024
00025 #include "globus_common_include.h"
00026 #include "globus_module.h"
00027 #include "globus_callback.h"
00028
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 extern globus_module_descriptor_t globus_i_thread_common_module;
00035
00036 #define GLOBUS_THREAD_COMMON_MODULE (&globus_i_thread_common_module)
00037
00038 typedef int globus_thread_callback_index_t;
00039
00040
00041 typedef
00042 void
00043 (*globus_thread_blocking_func_t)(
00044 globus_thread_callback_index_t ndx,
00045 globus_callback_space_t space,
00046 void * user_args);
00047
00048 #define globus_thread_blocking_callback_push(f, u, i) \
00049 globus_thread_blocking_space_callback_push( \
00050 (f), (u), GLOBUS_CALLBACK_GLOBAL_SPACE, (i))
00051
00052 int
00053 globus_thread_blocking_space_callback_push(
00054 globus_thread_blocking_func_t func,
00055 void * user_args,
00056 globus_callback_space_t space,
00057 globus_thread_callback_index_t * i);
00058
00059 int
00060 globus_thread_blocking_callback_pop(
00061 globus_thread_callback_index_t * i);
00062
00063 int
00064 globus_thread_blocking_callback_enable(
00065 globus_thread_callback_index_t * i);
00066
00067
00068 int
00069 globus_thread_blocking_callback_disable(
00070 globus_thread_callback_index_t * i);
00071
00072 #define globus_thread_blocking_will_block() \
00073 globus_thread_blocking_space_will_block(GLOBUS_CALLBACK_GLOBAL_SPACE)
00074
00075 int
00076 globus_thread_blocking_space_will_block(
00077 globus_callback_space_t blocking_space);
00078
00079 void
00080 globus_thread_blocking_reset();
00081
00082 void thread_print(char * s, ...);
00083
00084
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088
00089 #endif