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