annotate src/lock.h @ 344:a79adfd728d1 noffle

[svn] added openbsd-inetd dependency option
author godisch
date Wed, 12 Mar 2003 08:45:38 +0000
parents 8ea6b5ddc5a5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
1 /*
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
2 lock.h
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
3
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
4 Opening/Closing of the various databases: article overview database,
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
5 articla database, groups database, outgoing articles database, requests
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
6 database. Handles global lock.
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
7
165
8ea6b5ddc5a5 [svn] * src/lock.h,src/lock.c,src/noffle.c: Add lazy lock release. Only release
bears
parents: 127
diff changeset
8 $Id: lock.h 249 2001-01-25 13:38:31Z bears $
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
9 */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
10
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
11 #ifndef LOCK_H
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
12 #define LOCK_H
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
13
45
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
14 #if HAVE_CONFIG_H
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
15 #include <config.h>
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
16 #endif
32ba1198c6fa [svn] * Makefile.in, configure, configure.in, docs/Makefile.in, src/Makefile.in:
uh1763
parents: 43
diff changeset
17
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
18 #include "common.h"
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
19
127
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
20 enum LockRequestWait { LOCK_WAIT, LOCK_NOWAIT };
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
21
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
22 /* Open all databases and set global lock. */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
23 Bool
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
24 Lock_openDatabases( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
25
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
26 /* Close all databases and release global lock. */
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
27 void
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
28 Lock_closeDatabases( void );
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
29
165
8ea6b5ddc5a5 [svn] * src/lock.h,src/lock.c,src/noffle.c: Add lazy lock release. Only release
bears
parents: 127
diff changeset
30 /* Ensure all databases synced to disc. */
8ea6b5ddc5a5 [svn] * src/lock.h,src/lock.c,src/noffle.c: Add lazy lock release. Only release
bears
parents: 127
diff changeset
31 void
8ea6b5ddc5a5 [svn] * src/lock.h,src/lock.c,src/noffle.c: Add lazy lock release. Only release
bears
parents: 127
diff changeset
32 Lock_syncDatabases( void );
8ea6b5ddc5a5 [svn] * src/lock.h,src/lock.c,src/noffle.c: Add lazy lock release. Only release
bears
parents: 127
diff changeset
33
127
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
34 /* Check the global lock held. */
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
35 Bool
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
36 Lock_gotLock( void );
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
37
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
38 /* Get fetch lock. */
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
39 Bool
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
40 Lock_getFetchLock( enum LockRequestWait wait );
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
41
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
42 /* Release fetch lock. */
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
43 void
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
44 Lock_releaseFetchLock( void );
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
45
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
46 /* Check the fetch lock held. */
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
47 Bool
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
48 Lock_fetchLock( void );
3c71e28c8eef [svn] Release-1-0 mergedocs/NOTES
bears
parents: 45
diff changeset
49
43
2842f50feb55 [svn] * client.c, client.h, common.h, config.c, config.h, content.c, content.h,
uh1763
parents:
diff changeset
50 #endif