globus_thread_common.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 1999-2006 University of Chicago
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  * http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
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 /* function prototypes */
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

Generated on 20 Jun 2015 for globus_common by  doxygen 1.4.7