@@ -1211,56 +1211,10 @@ def get_files(self):
12111211 'pthread_kill.c' ,
12121212 'emscripten_thread_init.c' ,
12131213 'emscripten_yield.c' ,
1214+ 'thread_profiler.c' ,
12141215 ])
12151216 else :
12161217 ignore += ['thread' ]
1217- libc_files += files_in_path (
1218- path = 'system/lib/libc/musl/src/thread' ,
1219- filenames = [
1220- 'pthread_self.c' ,
1221- 'pthread_cleanup_push.c' ,
1222- 'pthread_attr_init.c' ,
1223- 'pthread_attr_destroy.c' ,
1224- 'pthread_attr_get.c' ,
1225- 'pthread_attr_setdetachstate.c' ,
1226- 'pthread_attr_setguardsize.c' ,
1227- 'pthread_attr_setinheritsched.c' ,
1228- 'pthread_attr_setschedparam.c' ,
1229- 'pthread_attr_setschedpolicy.c' ,
1230- 'pthread_attr_setscope.c' ,
1231- 'pthread_attr_setstack.c' ,
1232- 'pthread_attr_setstacksize.c' ,
1233- 'pthread_getattr_np.c' ,
1234- 'pthread_getconcurrency.c' ,
1235- 'pthread_getcpuclockid.c' ,
1236- 'pthread_getschedparam.c' ,
1237- 'pthread_setschedprio.c' ,
1238- 'pthread_setconcurrency.c' ,
1239- 'default_attr.c' ,
1240- # C11 thread library functions
1241- 'call_once.c' ,
1242- 'tss_create.c' ,
1243- 'tss_delete.c' ,
1244- 'tss_set.c' ,
1245- 'cnd_broadcast.c' ,
1246- 'cnd_destroy.c' ,
1247- 'cnd_init.c' ,
1248- 'cnd_signal.c' ,
1249- 'cnd_timedwait.c' ,
1250- 'cnd_wait.c' ,
1251- 'mtx_destroy.c' ,
1252- 'mtx_init.c' ,
1253- 'mtx_lock.c' ,
1254- 'mtx_timedlock.c' ,
1255- 'mtx_trylock.c' ,
1256- 'mtx_unlock.c' ,
1257- 'thrd_create.c' ,
1258- 'thrd_exit.c' ,
1259- 'thrd_join.c' ,
1260- 'thrd_sleep.c' ,
1261- 'thrd_yield.c' ,
1262- ])
1263-
12641218 libc_files += files_in_path (
12651219 path = 'system/lib/libc' ,
12661220 filenames = ['emscripten_yield_stub.c' ])
@@ -1285,6 +1239,52 @@ def get_files(self):
12851239 'pthread_self_stub.c' ,
12861240 'proxying_stub.c' ,
12871241 ])
1242+ libc_files += files_in_path (
1243+ path = 'system/lib/libc/musl/src/thread' ,
1244+ filenames = [
1245+ 'pthread_self.c' ,
1246+ 'pthread_cleanup_push.c' ,
1247+ 'pthread_attr_init.c' ,
1248+ 'pthread_attr_destroy.c' ,
1249+ 'pthread_attr_get.c' ,
1250+ 'pthread_attr_setdetachstate.c' ,
1251+ 'pthread_attr_setguardsize.c' ,
1252+ 'pthread_attr_setinheritsched.c' ,
1253+ 'pthread_attr_setschedparam.c' ,
1254+ 'pthread_attr_setschedpolicy.c' ,
1255+ 'pthread_attr_setscope.c' ,
1256+ 'pthread_attr_setstack.c' ,
1257+ 'pthread_attr_setstacksize.c' ,
1258+ 'pthread_getattr_np.c' ,
1259+ 'pthread_getconcurrency.c' ,
1260+ 'pthread_getcpuclockid.c' ,
1261+ 'pthread_getschedparam.c' ,
1262+ 'pthread_setschedprio.c' ,
1263+ 'pthread_setconcurrency.c' ,
1264+ 'default_attr.c' ,
1265+ # C11 thread library functions
1266+ 'call_once.c' ,
1267+ 'tss_create.c' ,
1268+ 'tss_delete.c' ,
1269+ 'tss_set.c' ,
1270+ 'cnd_broadcast.c' ,
1271+ 'cnd_destroy.c' ,
1272+ 'cnd_init.c' ,
1273+ 'cnd_signal.c' ,
1274+ 'cnd_timedwait.c' ,
1275+ 'cnd_wait.c' ,
1276+ 'mtx_destroy.c' ,
1277+ 'mtx_init.c' ,
1278+ 'mtx_lock.c' ,
1279+ 'mtx_timedlock.c' ,
1280+ 'mtx_trylock.c' ,
1281+ 'mtx_unlock.c' ,
1282+ 'thrd_create.c' ,
1283+ 'thrd_exit.c' ,
1284+ 'thrd_join.c' ,
1285+ 'thrd_sleep.c' ,
1286+ 'thrd_yield.c' ,
1287+ ])
12881288
12891289 if self .is_mt or self .is_ww :
12901290 # Low level thread primitives available in both pthreads and wasm workers builds.
@@ -1412,10 +1412,6 @@ def get_files(self):
14121412 if settings .MAIN_MODULE :
14131413 libc_files += files_in_path (path = 'system/lib/libc' , filenames = ['dynlink.c' ])
14141414
1415- libc_files += files_in_path (
1416- path = 'system/lib/pthread' ,
1417- filenames = ['thread_profiler.c' ])
1418-
14191415 libc_files += glob_in_path ('system/lib/libc/compat' , '*.c' )
14201416
14211417 # Check for missing file in non_lto_files list. Do this here
0 commit comments