Home | History | Annotate | Download | only in helgrind

Lines Matching refs:heldBy

197    lock->heldBy           = NULL;
203 /* Release storage for a Lock. Also release storage in .heldBy, if
210 if (lk->heldBy)
211 VG_(deleteBag)( lk->heldBy );
231 tl_assert(lk->heldBy == NULL);
236 tl_assert(lk->heldBy != NULL);
243 tl_assert(lk->heldBy == NULL); /* can't w-lock recursively */
246 lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNaw.1", HG_(free) );
247 VG_(addToBag)( lk->heldBy, (Word)thr );
250 if (lk->heldBy == NULL)
255 tl_assert(VG_(sizeUniqueBag(lk->heldBy)) == 1);
257 tl_assert(VG_(elemBag)(lk->heldBy, (Word)thr)
258 == VG_(sizeTotalBag)(lk->heldBy));
259 VG_(addToBag)(lk->heldBy, (Word)thr);
262 tl_assert(lk->heldBy == NULL && !lk->heldW); /* must be unheld */
277 tl_assert(lk->heldBy == NULL
278 || (lk->heldBy != NULL && !lk->heldW));
287 tl_assert(lk->heldBy == NULL);
292 tl_assert(lk->heldBy != NULL);
296 if (lk->heldBy) {
297 VG_(addToBag)(lk->heldBy, (Word)thr);
300 lk->heldBy = VG_(newBag)( HG_(zalloc), "hg.lNar.1", HG_(free) );
301 VG_(addToBag)( lk->heldBy, (Word)thr );
317 tl_assert(lk->heldBy);
320 b = VG_(delFromBag)(lk->heldBy, (Word)thr);
325 if (VG_(isEmptyBag)(lk->heldBy)) {
326 VG_(deleteBag)(lk->heldBy);
327 lk->heldBy = NULL;
337 if (!lk->heldBy) {
342 VG_(initIterBag)( lk->heldBy );
343 while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) {
357 VG_(doneIterBag)( lk->heldBy );
455 space(d+3); VG_(printf)("heldBy %p", lk->heldBy);
456 if (lk->heldBy) {
460 VG_(initIterBag)( lk->heldBy );
461 while (VG_(nextIterBag)( lk->heldBy, (Word*)&thr, &count ))
463 VG_(doneIterBag)( lk->heldBy );
793 if (lk->heldBy)
794 return VG_(elemBag)( lk->heldBy, (Word)thr ) > 0;
864 if (lk->heldBy) {
867 VG_(initIterBag)( lk->heldBy );
868 while (VG_(nextIterBag)( lk->heldBy,
883 VG_(doneIterBag)( lk->heldBy );
886 if (lk->heldW) BAD("9"); /* should be False if !heldBy */
1158 if (lk->heldBy == NULL) {
1169 tl_assert(lk->heldBy);
1179 tl_assert(VG_(sizeUniqueBag)(lk->heldBy) == 1); /* from precondition */
1181 if (thr != (Thread*)VG_(anyElementOfBag)(lk->heldBy)) {
1255 if (lk->heldBy == NULL) {
1266 tl_assert(lk->heldBy);
1338 if (!lock->heldBy) {
1349 tl_assert(lock->heldBy);
1354 n = VG_(elemBag)( lock->heldBy, (Word)thr );
1361 Thread* realOwner = (Thread*)VG_(anyElementOfBag)( lock->heldBy );
1379 tl_assert(lock->heldBy);
1380 tl_assert(n == VG_(elemBag)( lock->heldBy, (Word)thr ));
1394 if (lock->kind == LK_rdwr && lock->heldBy) {
1411 tl_assert(!lock->heldBy);
1414 //if (lock->heldBy) {
1415 // tl_assert(0 == VG_(elemBag)( lock->heldBy, (Word)thr ));
1966 if (lk->heldBy) {
1972 VG_(deleteBag)( lk->heldBy );
1973 lk->heldBy = NULL;
1977 tl_assert( !lk->heldBy );
2014 && lk->heldBy
2016 && VG_(elemBag)( lk->heldBy, (Word)thr ) > 0 ) {
2104 if (lk && lk->heldBy) {
2264 // if (lk->heldBy == NULL) {
2269 // if (lk->heldBy != NULL && 0 == VG_(elemBag)(lk->heldBy, (Word)thr)) {
2315 if (lk->heldBy == NULL) {
2320 if (lk->heldBy != NULL
2321 && VG_(elemBag)( lk->heldBy, (Word)thr ) == 0) {
2441 if (lk->heldBy) {
2447 VG_(deleteBag)( lk->heldBy );
2448 lk->heldBy = NULL;
2452 tl_assert( !lk->heldBy );