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

Function main

test/pthread/test_pthread_mutex.c:89–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89int main() {
90 pthread_mutexattr_t attr;
91 pthread_mutexattr_init(&attr);
92 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
93 pthread_mutex_init(&lock, &attr);
94
95 pthread_mutex_lock(&lock);
96 pthread_mutex_unlock(&lock);
97
98 // Create new threads in parallel.
99 for (int i = 0; i < NUM_THREADS; ++i) {
100 CreateThread(i, threadNum++);
101 }
102
103 emscripten_set_timeout_loop(WaitToJoin, 100, 0);
104 return 99;
105}

Callers

nothing calls this directly

Calls 4

pthread_mutexattr_initFunction · 0.85
CreateThreadFunction · 0.70
pthread_mutex_initFunction · 0.50

Tested by

no test coverage detected