update NSPR to 4.24 and keep NSPR Bug 1586070 and win64 patch intact.

This commit is contained in:
Roy Tam 2020-01-03 13:34:04 +08:00
commit 0b9855b841
487 changed files with 42933 additions and 48679 deletions

View file

@ -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);