]> SALOME platform Git repositories - modules/kernel.git/blob - src/Batch/Batch_IOMutex.hxx
Salome HOME
PR: merge from branch BR_auto_V310 tag mergefrom_OCC_development_for_3_2_0a2_10mar06
[modules/kernel.git] / src / Batch / Batch_IOMutex.hxx
1 /*
2  * IOMutex.hxx : 
3  *
4  * Auteur : Ivan DUTKA-MALEN - EDF R&D
5  * Mail   : mailto:ivan.dutka-malen@der.edf.fr
6  * Date   : Fri Nov 14 11:00:39 2003
7  * Projet : Salome 2
8  *
9  */
10
11 #ifndef _IOMUTEX_H_
12 #define _IOMUTEX_H_
13
14 #include <pthread.h>
15
16 #define LOCK_IO               { pthread_mutex_lock(&Batch::IOMutex) ; }
17 #define UNLOCK_IO             { pthread_mutex_unlock(&Batch::IOMutex) ; }
18 #define UNDER_LOCK(statement) { LOCK_IO ; { statement ; } ; UNLOCK_IO ; }
19
20 namespace Batch {
21
22   extern pthread_mutex_t IOMutex;
23   
24 }
25
26 #endif