globus_common 18.14
Loading...
Searching...
No Matches
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
26#include "globus_module.h"
27#include "globus_callback.h"
28
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34extern globus_module_descriptor_t globus_i_thread_common_module;
35
36#define GLOBUS_THREAD_COMMON_MODULE (&globus_i_thread_common_module)
37
38typedef int globus_thread_callback_index_t;
39
40/* function prototypes */
41typedef
42void
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
52int
53globus_thread_blocking_space_callback_push(
54 globus_thread_blocking_func_t func,
55 void * user_args,
57 globus_thread_callback_index_t * i);
58
59int
60globus_thread_blocking_callback_pop(
61 globus_thread_callback_index_t * i);
62
63int
64globus_thread_blocking_callback_enable(
65 globus_thread_callback_index_t * i);
66
67
68int
69globus_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
75int
76globus_thread_blocking_space_will_block(
77 globus_callback_space_t blocking_space);
78
79void
80globus_thread_blocking_reset();
81
82void thread_print(char * s, ...);
83
84
85#ifdef __cplusplus
86}
87#endif
88
89#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:112
Module Descriptor.
Definition globus_module.h:72