View | Details | Raw Unified | Return to bug 209233 | Differences between
and this patch

Collapse All | Expand All

(-)b/lib/libthr/thread/thr_resume_np.c (-1 / +1 lines)
Lines 91-97 static void Link Here
91
resume_common(struct pthread *thread)
91
resume_common(struct pthread *thread)
92
{
92
{
93
	/* Clear the suspend flag: */
93
	/* Clear the suspend flag: */
94
	thread->flags &= ~THR_FLAGS_NEED_SUSPEND;
94
	thread->flags &= ~(THR_FLAGS_NEED_SUSPEND | THR_FLAGS_SUSPENDED);
95
	thread->cycle++;
95
	thread->cycle++;
96
	_thr_umtx_wake(&thread->cycle, 1, 0);
96
	_thr_umtx_wake(&thread->cycle, 1, 0);
97
}
97
}
(-)b/lib/libthr/thread/thr_sig.c (-3 / +1 lines)
Lines 374-381 check_suspend(struct pthread *curthread) Link Here
374
	 */
374
	 */
375
	curthread->critical_count++;
375
	curthread->critical_count++;
376
	THR_UMUTEX_LOCK(curthread, &(curthread)->lock);
376
	THR_UMUTEX_LOCK(curthread, &(curthread)->lock);
377
	while ((curthread->flags & (THR_FLAGS_NEED_SUSPEND |
377
	while ((curthread->flags & THR_FLAGS_NEED_SUSPEND) != 0) {
378
		THR_FLAGS_SUSPENDED)) == THR_FLAGS_NEED_SUSPEND) {
379
		curthread->cycle++;
378
		curthread->cycle++;
380
		cycle = curthread->cycle;
379
		cycle = curthread->cycle;
381
380
Lines 392-398 check_suspend(struct pthread *curthread) Link Here
392
		THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock);
391
		THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock);
393
		_thr_umtx_wait_uint(&curthread->cycle, cycle, NULL, 0);
392
		_thr_umtx_wait_uint(&curthread->cycle, cycle, NULL, 0);
394
		THR_UMUTEX_LOCK(curthread, &(curthread)->lock);
393
		THR_UMUTEX_LOCK(curthread, &(curthread)->lock);
395
		curthread->flags &= ~THR_FLAGS_SUSPENDED;
396
	}
394
	}
397
	THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock);
395
	THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock);
398
	curthread->critical_count--;
396
	curthread->critical_count--;

Return to bug 209233