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

Function CreateThread

test/pthread/test_pthread_mutex.c:47–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void CreateThread(int i, int n) {
48 pthread_attr_t attr;
49 pthread_attr_init(&attr);
50 pthread_attr_setstacksize(&attr, 4*1024);
51 int rc = pthread_create(&thread[i], &attr, ThreadMain, 0);
52 if (rc != 0 || thread[i] == 0)
53 printf("Failed to create thread!\n");
54 pthread_attr_destroy(&attr);
55}
56
57int threadNum = 0;
58

Callers 2

WaitToJoinFunction · 0.70
mainFunction · 0.70

Calls 4

pthread_attr_initFunction · 0.85
printfFunction · 0.85
pthread_attr_destroyFunction · 0.85

Tested by

no test coverage detected