/usr/include/saf/ais_lock.h is in libheartbeat2-dev 1:3.0.6-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | #ifndef _AIS_LOCK_H_
#define _AIS_LOCK_H_
#include "ais_base.h"
/* Chapter 10 */
typedef OPAQUE_TYPE SaLckHandleT;
typedef OPAQUE_TYPE SaLckLockIdT;
typedef OPAQUE_TYPE SaLckResourceIdT;
#define SA_LCK_LOCK_NO_QUEUE 0x1
#define SA_LCK_LOCK_ORPHAN 0x2
#define SA_LCK_LOCK_TIMEOUT 0X4
typedef SaUint32T SaLckLockFlagsT;
typedef enum {
SA_LCK_LOCK_GRANTED = 1,
SA_LCK_LOCK_RELEASED = 2,
SA_LCK_LOCK_DEADLOCK = 3,
SA_LCK_LOCK_NOT_QUEUED = 4,
SA_LCK_LOCK_TIMED_OUT = 5,
SA_LCK_LOCK_ORPHANED = 6,
SA_LCK_LOCK_NO_MORE = 7
} SaLckLockStatusT;
typedef enum {
SA_LCK_PR_LOCK_MODE = 1,
SA_LCK_EX_LOCK_MODE = 2
} SaLckLockModeT;
typedef void
(*SaLckLockGrantCallbackT)(SaInvocationT invocation,
const SaLckResourceIdT *resourceId,
const SaLckLockIdT *lockId,
SaLckLockModeT lockMode,
SaLckLockStatusT lockStatus,
SaErrorT error);
typedef void
(*SaLckLockWaiterCallbackT)(SaInvocationT invocation,
const SaLckResourceIdT *resourceId,
const SaLckLockIdT *lockId,
SaLckLockModeT modeHeld,
SaLckLockModeT modeRequested);
typedef void
(*SaLckResourceUnlockCallbackT)(SaInvocationT invocation,
const SaLckResourceIdT *resourceId,
const SaLckLockIdT *lockId,
SaLckLockStatusT lockStatus,
SaErrorT error);
typedef struct{
SaLckLockGrantCallbackT saLckLockGrantCallback;
SaLckLockWaiterCallbackT saLckLockWaiterCallback;
SaLckResourceUnlockCallbackT saLckResourceUnlockCallback;
} SaLckCallbacksT;
SaErrorT
saLckInitialize(SaLckHandleT *lckHandle, const SaLckCallbacksT *lckCallbacks,
const SaVersionT *version);
SaErrorT
saLckSelectionObjectGet(const SaLckHandleT *lckHandle,
SaSelectionObjectT *selectionObject);
SaErrorT
saLckDispatch(const SaLckHandleT *lckHandle,
const SaDispatchFlagsT dispatchFlags);
SaErrorT
saLckFinalize(SaLckHandleT *lckHandle);
SaErrorT
saLckResourceOpen(const SaLckHandleT *lckHandle,
const SaNameT *lockName,
SaLckResourceIdT *resourceId);
SaErrorT
saLckResourceClose(SaLckHandleT *lckHandle, SaLckResourceIdT *resourceId);
SaErrorT
saLckResourceLock(const SaLckHandleT *lckHandle, SaInvocationT invocation,
const SaLckResourceIdT *resourceId,
SaLckLockIdT *lockId,
SaLckLockModeT lockMode,
SaLckLockFlagsT lockFlags,
SaTimeT timeout,
SaLckLockStatusT *lockStatus);
SaErrorT
SaLckResourceLockAsync(const SaLckHandleT *lckHandle,
SaInvocationT invocation,
const SaLckResourceIdT *resourceId,
SaLckLockIdT *lockId,
SaLckLockModeT lockMode,
SaLckLockFlagsT lockFlags,
SaTimeT timeout);
SaErrorT
saLckResourceUnlock(const SaLckHandleT *lckHandle,
SaLckLockIdT *lockId,
SaTimeT timeout);
SaErrorT
saLckResourceUnlockAsync(const SaLckHandleT *lckHandle,
SaInvocationT invocation,
const SaLckLockIdT *lockId);
SaErrorT
saLckLockPurge(const SaLckHandleT *lckHandle,
const SaLckResourceIdT *resourceId);
#endif /* _AIS_LOCK_H_ */
|