00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 00002 * Copyright by The HDF Group. * 00003 * Copyright by the Board of Trustees of the University of Illinois. * 00004 * All rights reserved. * 00005 * * 00006 * This file is part of HDF5. The full HDF5 copyright notice, including * 00007 * terms governing use, modification, and redistribution, is contained in * 00008 * the files COPYING and Copyright.html. COPYING can be found at the root * 00009 * of the source code distribution tree; Copyright.html can be found at the * 00010 * root level of an installed copy of the electronic HDF5 document set and * 00011 * is linked from the top-level documents page. It can also be found at * 00012 * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have * 00013 * access to either file, you may request a copy from help@hdfgroup.org. * 00014 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 00015 00016 /*------------------------------------------------------------------------- 00017 * 00018 * Created: H5TSprivate.h 00019 * May 2 2000 00020 * Chee Wai LEE 00021 * 00022 * Purpose: Private non-prototype header. 00023 * 00024 * Modifications: 00025 * 00026 *------------------------------------------------------------------------- 00027 */ 00028 #ifndef H5TSprivate_H_ 00029 #define H5TSprivate_H_ 00030 00031 /* Public headers needed by this file */ 00032 #ifdef LATER 00033 #include "H5TSpublic.h" /*Public API prototypes */ 00034 #endif /* LATER */ 00035 00036 /* Library level data structures */ 00037 00038 typedef struct H5TS_mutex_struct { 00039 pthread_t owner_thread; /* current lock owner */ 00040 pthread_mutex_t atomic_lock; /* lock for atomicity of new mechanism */ 00041 pthread_cond_t cond_var; /* condition variable */ 00042 unsigned int lock_count; 00043 } H5TS_mutex_t; 00044 00045 /* Extern global variables */ 00046 extern pthread_once_t H5TS_first_init_g; 00047 extern pthread_key_t H5TS_errstk_key_g; 00048 extern pthread_key_t H5TS_funcstk_key_g; 00049 00050 #if defined c_plusplus || defined __cplusplus 00051 extern "C" 00052 { 00053 #endif /* c_plusplus || __cplusplus */ 00054 00055 H5_DLL void H5TS_first_thread_init(void); 00056 H5_DLL herr_t H5TS_mutex_lock(H5TS_mutex_t *mutex); 00057 H5_DLL herr_t H5TS_mutex_unlock(H5TS_mutex_t *mutex); 00058 H5_DLL herr_t H5TS_cancel_count_inc(void); 00059 H5_DLL herr_t H5TS_cancel_count_dec(void); 00060 00061 #if defined c_plusplus || defined __cplusplus 00062 } 00063 #endif /* c_plusplus || __cplusplus */ 00064 00065 #endif /* H5TSprivate_H_ */