Grid Community Toolkit  6.2.1567772254 (tag: v6.2.20190906)
globus_thread_common.h
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2006 University of Chicago
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
22 #ifndef GLOBUS_THREAD_COMMON_H
23 #define GLOBUS_THREAD_COMMON_H
24 
25 #include "globus_common_include.h"
26 #include "globus_module.h"
27 #include "globus_callback.h"
28 
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 extern globus_module_descriptor_t globus_i_thread_common_module;
35 
36 #define GLOBUS_THREAD_COMMON_MODULE (&globus_i_thread_common_module)
37 
38 typedef int globus_thread_callback_index_t;
39 
40 /* function prototypes */
41 typedef
42 void
43 (*globus_thread_blocking_func_t)(
44  globus_thread_callback_index_t ndx,
46  void * user_args);
47 
48 #define globus_thread_blocking_callback_push(f, u, i) \
49  globus_thread_blocking_space_callback_push( \
50  (f), (u), GLOBUS_CALLBACK_GLOBAL_SPACE, (i))
51 
52 int
53 globus_thread_blocking_space_callback_push(
54  globus_thread_blocking_func_t func,
55  void * user_args,
57  globus_thread_callback_index_t * i);
58 
59 int
60 globus_thread_blocking_callback_pop(
61  globus_thread_callback_index_t * i);
62 
63 int
64 globus_thread_blocking_callback_enable(
65  globus_thread_callback_index_t * i);
66 
67 
68 int
69 globus_thread_blocking_callback_disable(
70  globus_thread_callback_index_t * i);
71 
72 #define globus_thread_blocking_will_block() \
73  globus_thread_blocking_space_will_block(GLOBUS_CALLBACK_GLOBAL_SPACE)
74 
75 int
76 globus_thread_blocking_space_will_block(
77  globus_callback_space_t blocking_space);
78 
79 void
80 globus_thread_blocking_reset();
81 
82 void thread_print(char * s, ...);
83 
84 
85 #ifdef __cplusplus
86 }
87 #endif
88 
89 #endif
Globus Callback API.
Reference Counting Module Activation and Deactivation.
Include System Headers.
int globus_callback_space_t
Callback space handle.
Definition: globus_callback.h:112
Module Descriptor.
Definition: globus_module.h:71