comparison src/lock.h @ 127:3c71e28c8eef noffle

[svn] Release-1-0 mergedocs/NOTES
author bears
date Tue, 25 Jul 2000 13:14:54 +0100
parents 32ba1198c6fa
children 8ea6b5ddc5a5
comparison
equal deleted inserted replaced
126:7c7a7c96d35b 127:3c71e28c8eef
3 3
4 Opening/Closing of the various databases: article overview database, 4 Opening/Closing of the various databases: article overview database,
5 articla database, groups database, outgoing articles database, requests 5 articla database, groups database, outgoing articles database, requests
6 database. Handles global lock. 6 database. Handles global lock.
7 7
8 $Id: lock.h 51 2000-05-05 23:49:38Z uh1763 $ 8 $Id: lock.h 183 2000-07-25 12:14:54Z bears $
9 */ 9 */
10 10
11 #ifndef LOCK_H 11 #ifndef LOCK_H
12 #define LOCK_H 12 #define LOCK_H
13 13
15 #include <config.h> 15 #include <config.h>
16 #endif 16 #endif
17 17
18 #include "common.h" 18 #include "common.h"
19 19
20 enum LockRequestWait { LOCK_WAIT, LOCK_NOWAIT };
21
20 /* Open all databases and set global lock. */ 22 /* Open all databases and set global lock. */
21 Bool 23 Bool
22 Lock_openDatabases( void ); 24 Lock_openDatabases( void );
23 25
24 /* Close all databases and release global lock. */ 26 /* Close all databases and release global lock. */
25 void 27 void
26 Lock_closeDatabases( void ); 28 Lock_closeDatabases( void );
27 29
30 /* Check the global lock held. */
31 Bool
32 Lock_gotLock( void );
33
34 /* Get fetch lock. */
35 Bool
36 Lock_getFetchLock( enum LockRequestWait wait );
37
38 /* Release fetch lock. */
39 void
40 Lock_releaseFetchLock( void );
41
42 /* Check the fetch lock held. */
43 Bool
44 Lock_fetchLock( void );
45
28 #endif 46 #endif