summaryrefslogtreecommitdiffstats
path: root/nsprpub/pr/tests/intrio.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-01-02 21:01:38 +0100
commitf7d30133221896638f7bf4f66c504255c4b14f48 (patch)
tree5f3e07a049f388a3a309a615b8884318f6668a98 /nsprpub/pr/tests/intrio.c
parent26b297510a11758727438df4669357a2a2bc42ce (diff)
downloadUXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.gz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.lz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.tar.xz
UXP-f7d30133221896638f7bf4f66c504255c4b14f48.zip
Issue #1338 - Part 1: Update NSPR to 4.24
Diffstat (limited to 'nsprpub/pr/tests/intrio.c')
-rw-r--r--nsprpub/pr/tests/intrio.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/nsprpub/pr/tests/intrio.c b/nsprpub/pr/tests/intrio.c
index 691ed8158..23d834d66 100644
--- a/nsprpub/pr/tests/intrio.c
+++ b/nsprpub/pr/tests/intrio.c
@@ -62,7 +62,7 @@ static void PR_CALLBACK IOThread(void *arg)
}
if (PR_GetError() != PR_PENDING_INTERRUPT_ERROR) {
fprintf(stderr, "PR_Accept failed (%d, %d)\n",
- PR_GetError(), PR_GetOSError());
+ PR_GetError(), PR_GetOSError());
exit(1);
}
printf("PR_Accept() is interrupted as expected\n");
@@ -77,23 +77,24 @@ static void Test(PRThreadScope scope1, PRThreadScope scope2)
PRThread *iothread, *abortio;
printf("A %s thread will be interrupted by a %s thread\n",
- (scope1 == PR_LOCAL_THREAD ? "local" : "global"),
- (scope2 == PR_LOCAL_THREAD ? "local" : "global"));
+ (scope1 == PR_LOCAL_THREAD ? "local" : "global"),
+ (scope2 == PR_LOCAL_THREAD ? "local" : "global"));
iothread_ready = PR_FALSE;
iothread = PR_CreateThread(
- PR_USER_THREAD, IOThread, NULL, PR_PRIORITY_NORMAL,
- scope1, PR_JOINABLE_THREAD, 0);
+ PR_USER_THREAD, IOThread, NULL, PR_PRIORITY_NORMAL,
+ scope1, PR_JOINABLE_THREAD, 0);
if (iothread == NULL) {
fprintf(stderr, "cannot create thread\n");
exit(1);
}
PR_Lock(lock);
- while (!iothread_ready)
+ while (!iothread_ready) {
PR_WaitCondVar(cvar, PR_INTERVAL_NO_TIMEOUT);
+ }
PR_Unlock(lock);
abortio = PR_CreateThread(
- PR_USER_THREAD, AbortIO, iothread, PR_PRIORITY_NORMAL,
- scope2, PR_JOINABLE_THREAD, 0);
+ PR_USER_THREAD, AbortIO, iothread, PR_PRIORITY_NORMAL,
+ scope2, PR_JOINABLE_THREAD, 0);
if (abortio == NULL) {
fprintf(stderr, "cannot create thread\n");
exit(1);