Lines Matching refs:lock
65 static Bool is_sane_Lock_BASE ( Lock* lock )
67 if (lock == NULL
68 || (lock->magic != LockN_MAGIC && lock->magic != LockP_MAGIC))
70 switch (lock->kind) {
74 if (lock->heldBy == NULL) {
75 if (lock->acquired_at != NULL) return False;
77 return !lock->heldW;
79 if (lock->acquired_at == NULL) return False;
84 if (VG_(isEmptyBag)(lock->heldBy))
88 if (!is_sane_Bag_of_Threads(lock->heldBy))
90 if (lock->heldW) {
92 if ((lock->kind == LK_nonRec || lock->kind == LK_rdwr)
93 && !VG_(isSingletonTotalBag)(lock->heldBy))
97 if (lock->kind != LK_rdwr) return False;
102 Bool HG_(is_sane_LockP) ( Lock* lock ) {
103 return lock != NULL
104 && lock->magic == LockP_MAGIC
105 && lock->hbso == NULL
106 && is_sane_Lock_BASE(lock);
109 Bool HG_(is_sane_LockN) ( Lock* lock ) {
110 return lock != NULL
111 && lock->magic == LockN_MAGIC
112 && lock->hbso != NULL
113 && is_sane_Lock_BASE(lock);
116 Bool HG_(is_sane_LockNorP) ( Lock* lock ) {
117 return is_sane_Lock_BASE(lock);