diff --git a/system/lib/libc/musl/src/thread/pthread_mutex_unlock.c b/system/lib/libc/musl/src/thread/pthread_mutex_unlock.c index af13bcfa12012..9e10a22c30348 100644 --- a/system/lib/libc/musl/src/thread/pthread_mutex_unlock.c +++ b/system/lib/libc/musl/src/thread/pthread_mutex_unlock.c @@ -14,7 +14,7 @@ int __pthread_mutex_unlock(pthread_mutex_t *m) self = __pthread_self(); old = m->_m_lock; int own = old & 0x3fffffff; - if (own != self->tid) + if (own != CURRENT_THREAD_ID) return EPERM; if ((type&3) == PTHREAD_MUTEX_RECURSIVE && m->_m_count) return m->_m_count--, 0; diff --git a/test/codesize/test_codesize_minimal_pthreads.json b/test/codesize/test_codesize_minimal_pthreads.json index 7fc88d7cafe97..d17b05e9ccd93 100644 --- a/test/codesize/test_codesize_minimal_pthreads.json +++ b/test/codesize/test_codesize_minimal_pthreads.json @@ -1,10 +1,10 @@ { "a.out.js": 7367, "a.out.js.gz": 3605, - "a.out.nodebug.wasm": 19095, - "a.out.nodebug.wasm.gz": 8830, - "total": 26462, - "total_gz": 12435, + "a.out.nodebug.wasm": 19097, + "a.out.nodebug.wasm.gz": 8828, + "total": 26464, + "total_gz": 12433, "sent": [ "a (memory)", "b (exit)", diff --git a/test/codesize/test_codesize_minimal_pthreads_memgrowth.json b/test/codesize/test_codesize_minimal_pthreads_memgrowth.json index 6c771a690712c..da438fcd16f34 100644 --- a/test/codesize/test_codesize_minimal_pthreads_memgrowth.json +++ b/test/codesize/test_codesize_minimal_pthreads_memgrowth.json @@ -1,10 +1,10 @@ { "a.out.js": 7769, "a.out.js.gz": 3811, - "a.out.nodebug.wasm": 19096, - "a.out.nodebug.wasm.gz": 8831, - "total": 26865, - "total_gz": 12642, + "a.out.nodebug.wasm": 19098, + "a.out.nodebug.wasm.gz": 8829, + "total": 26867, + "total_gz": 12640, "sent": [ "a (memory)", "b (exit)",