pthread: testcancel() should exit with PTHREAD_CANCELED.

Fixes #19232.
This commit is contained in:
Augustin Cavalier 2024-11-06 14:58:09 -05:00
parent eaa234b678
commit 2a46c1e589

View File

@ -130,5 +130,5 @@ pthread_testcancel(void)
static const int32 kFlags = THREAD_CANCELED | THREAD_CANCEL_ENABLED;
if ((~atomic_get(&thread->flags) & kFlags) == 0)
pthread_exit(NULL);
pthread_exit(PTHREAD_CANCELED);
}