diff options
author | srinivas%netscape.com <devnull@localhost> | 1999-12-29 16:57:37 +0000 |
---|---|---|
committer | srinivas%netscape.com <devnull@localhost> | 1999-12-29 16:57:37 +0000 |
commit | eb0e6811974d6988307fb437404213172ae4e994 (patch) | |
tree | ee10a6d92b51a33a13d4a41d71653f87daa3d9a1 | |
parent | cedf386dd2a4c3d1ad27b1d5aa2bb19b5834cb1e (diff) | |
download | nspr-hg-eb0e6811974d6988307fb437404213172ae4e994.tar.gz |
Implement block/unblock interrupt. Bugzilla #17055.
-rw-r--r-- | pr/src/threads/prcthr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pr/src/threads/prcthr.c b/pr/src/threads/prcthr.c index 5a4fa502..af4a45aa 100644 --- a/pr/src/threads/prcthr.c +++ b/pr/src/threads/prcthr.c @@ -171,7 +171,7 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thread) thread->flags |= _PR_INTERRUPT; victim = thread->wait.cvar; _PR_THREAD_UNLOCK(thread); - if (NULL != victim) { + if ((NULL != victim) && (!(thread->flags & _PR_INTERRUPT_BLOCKED))) { int haveLock = (victim->lock->owner == _PR_MD_CURRENT_THREAD()); if (!haveLock) PR_Lock(victim->lock); @@ -194,7 +194,8 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thread) * call is made with thread locked; * on return lock is released */ - _PR_NotifyLockedThread(thread); + if (!(thread->flags & _PR_INTERRUPT_BLOCKED)) + _PR_NotifyLockedThread(thread); break; case _PR_IO_WAIT: /* @@ -203,7 +204,8 @@ PR_IMPLEMENT(PRStatus) PR_Interrupt(PRThread *thread) * released. */ #if defined(XP_UNIX) || defined(WINNT) || defined(WIN16) - _PR_Unblock_IO_Wait(thread); + if (!(thread->flags & _PR_INTERRUPT_BLOCKED)) + _PR_Unblock_IO_Wait(thread); #else _PR_THREAD_UNLOCK(thread); #endif |