Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions system/lib/pthread/library_pthread_stub.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ void __lock(void* ptr) {}

void __unlock(void* ptr) {}

void __inhibit_ptc() {}

void __acquire_ptc() {}

void __release_ptc() {}
Expand Down
10 changes: 8 additions & 2 deletions test/codesize/test_codesize_hello_dylink_all.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"a.out.js": 267889,
"a.out.nodebug.wasm": 587151,
"total": 855040,
"a.out.nodebug.wasm": 587563,
"total": 855452,
"sent": [
"IMG_Init",
"IMG_Load",
Expand Down Expand Up @@ -3206,6 +3206,7 @@
"pthread_detach",
"pthread_equal",
"pthread_exit",
"pthread_getattr_default_np",
"pthread_getattr_np",
"pthread_getconcurrency",
"pthread_getcpuclockid",
Expand All @@ -3230,6 +3231,7 @@
"pthread_mutexattr_init",
"pthread_mutexattr_setprotocol",
"pthread_mutexattr_setpshared",
"pthread_mutexattr_setrobust",
"pthread_mutexattr_settype",
"pthread_once",
"pthread_rwlock_destroy",
Expand All @@ -3246,6 +3248,7 @@
"pthread_rwlockattr_init",
"pthread_rwlockattr_setpshared",
"pthread_self",
"pthread_setattr_default_np",
"pthread_setcancelstate",
"pthread_setcanceltype",
"pthread_setconcurrency",
Expand Down Expand Up @@ -4960,6 +4963,7 @@
"$pthread_condattr_setclock",
"$pthread_condattr_setpshared",
"$pthread_equal",
"$pthread_getattr_default_np",
"$pthread_getattr_np",
"$pthread_getcpuclockid",
"$pthread_getspecific",
Expand All @@ -4970,8 +4974,10 @@
"$pthread_mutexattr_gettype",
"$pthread_mutexattr_setprotocol",
"$pthread_mutexattr_setpshared",
"$pthread_mutexattr_setrobust",
"$pthread_mutexattr_settype",
"$pthread_rwlockattr_init",
"$pthread_setattr_default_np",
"$pthread_setspecific",
"$pthread_sigmask",
"$pthread_spin_init",
Expand Down
63 changes: 10 additions & 53 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1247,73 +1247,30 @@ def get_files(self):
'pthread_self_stub.c',
'proxying_stub.c',
])

for pat in ('pthread_*attr*.c',
'pthread_spin*.c',
# C11 thread library functions
'cnd_*.c',
'mtx_*.c',
'tss_*.c',
'thrd_*.c'):
libc_files += glob_in_path('system/lib/libc/musl/src/thread', pat)

libc_files += files_in_path(
path='system/lib/libc/musl/src/thread',
filenames=[
'pthread_self.c',
'pthread_cleanup_push.c',
'pthread_attr_init.c',
'pthread_attr_destroy.c',
'pthread_attr_get.c',
'pthread_attr_setdetachstate.c',
'pthread_attr_setguardsize.c',
'pthread_attr_setinheritsched.c',
'pthread_attr_setschedparam.c',
'pthread_attr_setschedpolicy.c',
'pthread_attr_setscope.c',
'pthread_attr_setstack.c',
'pthread_attr_setstacksize.c',
'pthread_barrierattr_destroy.c',
'pthread_barrierattr_init.c',
'pthread_barrierattr_setpshared.c',
'pthread_condattr_destroy.c',
'pthread_condattr_init.c',
'pthread_condattr_setpshared.c',
'pthread_condattr_setclock.c',
'pthread_mutexattr_destroy.c',
'pthread_mutexattr_init.c',
'pthread_mutexattr_setprotocol.c',
'pthread_mutexattr_settype.c',
'pthread_mutexattr_setpshared.c',
'pthread_rwlockattr_destroy.c',
'pthread_rwlockattr_init.c',
'pthread_rwlockattr_setpshared.c',
'pthread_getattr_np.c',
'pthread_getconcurrency.c',
'pthread_getcpuclockid.c',
'pthread_getschedparam.c',
'pthread_spin_destroy.c',
'pthread_spin_init.c',
'pthread_spin_lock.c',
'pthread_spin_trylock.c',
'pthread_spin_unlock.c',
'pthread_setschedprio.c',
'pthread_setconcurrency.c',
'default_attr.c',
# C11 thread library functions
'call_once.c',
'tss_create.c',
'tss_delete.c',
'tss_set.c',
'cnd_broadcast.c',
'cnd_destroy.c',
'cnd_init.c',
'cnd_signal.c',
'cnd_timedwait.c',
'cnd_wait.c',
'mtx_destroy.c',
'mtx_init.c',
'mtx_lock.c',
'mtx_timedlock.c',
'mtx_trylock.c',
'mtx_unlock.c',
'sem_destroy.c',
'sem_init.c',
'thrd_create.c',
'thrd_exit.c',
'thrd_join.c',
'thrd_sleep.c',
'thrd_yield.c',
])

if self.is_mt or self.is_ww:
Expand Down
Loading