globus_common  17.11
globus_thread_common.h
Go to the documentation of this file.
1 
7 #ifndef GLOBUS_THREAD_COMMON_H
8 #define GLOBUS_THREAD_COMMON_H
9 
10 #include "globus_common_include.h"
11 #include "globus_module.h"
12 #include "globus_callback.h"
13 
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 extern globus_module_descriptor_t globus_i_thread_common_module;
20 
21 #define GLOBUS_THREAD_COMMON_MODULE (&globus_i_thread_common_module)
22 
23 typedef int globus_thread_callback_index_t;
24 
25 /* function prototypes */
26 typedef
27 void
28 (*globus_thread_blocking_func_t)(
29  globus_thread_callback_index_t ndx,
31  void * user_args);
32 
33 #define globus_thread_blocking_callback_push(f, u, i) \
34  globus_thread_blocking_space_callback_push( \
35  (f), (u), GLOBUS_CALLBACK_GLOBAL_SPACE, (i))
36 
37 int
38 globus_thread_blocking_space_callback_push(
39  globus_thread_blocking_func_t func,
40  void * user_args,
42  globus_thread_callback_index_t * i);
43 
44 int
45 globus_thread_blocking_callback_pop(
46  globus_thread_callback_index_t * i);
47 
48 int
49 globus_thread_blocking_callback_enable(
50  globus_thread_callback_index_t * i);
51 
52 
53 int
54 globus_thread_blocking_callback_disable(
55  globus_thread_callback_index_t * i);
56 
57 #define globus_thread_blocking_will_block() \
58  globus_thread_blocking_space_will_block(GLOBUS_CALLBACK_GLOBAL_SPACE)
59 
60 int
61 globus_thread_blocking_space_will_block(
62  globus_callback_space_t blocking_space);
63 
64 void
65 globus_thread_blocking_reset();
66 
67 void thread_print(char * s, ...);
68 
69 
70 #ifdef __cplusplus
71 }
72 #endif
73 
74 #endif
Globus Callback API.
Include System Headers.
Reference Counting Module Activation and Deactivation.
int globus_callback_space_t
Callback space handle.
Definition: globus_callback.h:97
Module Descriptor.
Definition: globus_module.h:55