disconnected-20080523
[openafs.git] / src / afs / discon.h
1 #ifndef _DISCON_H
2 #define _DISCON_H
3
4 #ifndef AFS_DISCON_ENV
5 #define AFS_IS_DISCONNECTED 0
6 #define AFS_IS_LOGGING 0
7 #define AFS_DISCON_LOCK()
8 #define AFS_DISCON_UNLOCK()
9
10 #else
11
12 extern afs_int32    afs_is_disconnected;
13 extern afs_int32    afs_is_logging;
14 extern afs_rwlock_t afs_discon_lock;
15
16 #define AFS_IS_DISCONNECTED (afs_is_disconnected)
17 #define AFS_IS_LOGGING (afs_is_logging)
18 #define AFS_DISCON_LOCK() ObtainReadLock(&afs_discon_lock)
19 #define AFS_DISCON_UNLOCK() ReleaseReadLock(&afs_discon_lock)
20
21 #endif /* AFS_DISCON_ENV */
22 #endif /* _DISCON_H */