Skip to content

Commit 112f1e0

Browse files
committed
[musl] Always cancelasync as a boolean. NFC
This is how all the other code in musl already treats it.
1 parent 6814b6d commit 112f1e0

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

system/lib/pthread/emscripten_futex_wait.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ int emscripten_futex_wait(volatile void *addr, uint32_t val, double max_wait_ms)
131131

132132
#ifdef __EMSCRIPTEN_PTHREADS__
133133
pthread_t self = pthread_self();
134-
bool cancelable = self->cancelasync == PTHREAD_CANCEL_ASYNCHRONOUS;
134+
bool cancelable = self->cancelasync;
135135
#else
136136
bool cancelable = false;
137137
#endif

system/lib/pthread/pthread_create.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ void _emscripten_thread_exit(void* result) {
309309
assert(self);
310310

311311
self->canceldisable = PTHREAD_CANCEL_DISABLE;
312-
self->cancelasync = PTHREAD_CANCEL_DEFERRED;
312+
self->cancelasync = 0;
313313
self->result = result;
314314

315315
_emscripten_thread_mailbox_shutdown(self);

0 commit comments

Comments
 (0)