gml_Mutex.h

Go to the documentation of this file.
00001 /**
00002  * @file gml_Mutex.h
00003  *
00004  *    Wrapper around APR's thread mutexes.
00005  *
00006  *  Copyright (c) 2004 CLIPS-IMAG
00007  *
00008  *  See the file "gml_LicenseTerms.txt" for information on usage and redistribution
00009  *  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
00010  *
00011  *  Created in December, 2004 (JL).
00012  */
00013 #ifndef __GML_MUTEX__
00014 #define __GML_MUTEX__
00015 
00016 #include "gml/base/gml_Types.h"
00017 
00018 /**
00019  * gml_TMutex --
00020  *
00021  *   Opaque type for mutexes.
00022  *   A mutex should always be NULL initially.
00023  */
00024 typedef struct gml_TMutex_* gml_TMutex;
00025 
00026 /**
00027  * gml_MutexLock --
00028  *
00029  *   Acquire an exclusive lock on a mutex.
00030  *   The result of locking a mutex twice from the same thread is undefined.
00031  */
00032 GML_EXTERN_C
00033 void gml_MutexLock     (gml_TMutex* mutex);
00034 
00035 /**
00036  * gml_MutexLock --
00037  *
00038  *   Release a locked mutex.
00039  *   It is not an error to unlock a mutex multiple times.
00040  *   Behavior is undefined is the mutex has never been locked before.
00041  */
00042 GML_EXTERN_C
00043 void gml_MutexUnlock   (gml_TMutex* mutex);
00044 
00045 /**
00046  * gml_MutexFinalize --
00047  *
00048  *   Release any resources claimed by a mutex.
00049  */
00050 GML_EXTERN_C
00051 void gml_MutexFinalize (gml_TMutex* mutex);
00052 
00053 
00054 #endif /* __GML_MUTEX__ */
00055 
Generated on Tue Jun 12 14:03:27 2007 for gml by Doxygen 1.5.2.