vg_assert(cv != NULL);
vg_assert(mx != NULL);
} else {
- /* Unfortunately these don't hold true when a sighandler is
- running. To be fixed. */
- /* vg_assert(cv == NULL); */
- /* vg_assert(mx == NULL); */
+ vg_assert(cv == NULL);
+ vg_assert(mx == NULL);
}
if (VG_(threads)[i].status != VgTs_Empty) {
break;
}
+ /* Clear the associated mx/cv information as we are no longer
+ waiting on anything. The original details will be restored
+ when the signal frame is popped. */
+ tst->associated_mx = NULL;
+ tst->associated_cv = NULL;
+
/* handler gets the union of the signal's mask and the thread's
mask */
handlermask = handler->scss_mask;
/* Scheduler-private stuff: what was the thread's status prior to
delivering this signal? */
ThreadStatus status;
+ void* /*pthread_mutex_t* */ associated_mx;
+ void* /*pthread_cond_t* */ associated_cv;
+
/* Sanity check word. Is the highest-addressed word; do not
move!*/
UInt magicE;
frame->status = VgTs_Runnable;
else
frame->status = tst->status;
+
+ frame->associated_mx = tst->associated_mx;
+ frame->associated_cv = tst->associated_cv;
frame->magicE = 0x27182818;
was delivered. */
tst->status = frame->status;
+ tst->associated_mx = frame->associated_mx;
+ tst->associated_cv = frame->associated_cv;
+
tst->sig_mask = frame->mask;
/* don't use the copy exposed to the handler; it might have changed