MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / thread_start

Function thread_start

test/pthread/test_pthread_kill.c:47–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void *thread_start(void *arg) {
48 pthread_barrier_wait(&started);
49 // As long as this thread is running, keep the shared variable latched to nonzero value.
50 while (!got_sigterm) {
51 sleepms(1);
52 }
53 printf("got term signal, sending signal back to main thread\n");
54 pthread_kill(main_thread, SIGUSR1);
55 return NULL;
56}
57
58int main() {
59 main_thread = pthread_self();

Callers

nothing calls this directly

Calls 4

printfFunction · 0.85
sleepmsFunction · 0.70
pthread_barrier_waitFunction · 0.50
pthread_killFunction · 0.50

Tested by

no test coverage detected