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

Function CreateThread

test/browser/gl_only_in_pthread.c:60–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60void CreateThread()
61{
62 pthread_attr_t attr;
63 pthread_attr_init(&attr);
64 emscripten_pthread_attr_settransferredcanvases(&attr, "#canvas");
65 int rc = pthread_create(&thread, &attr, ThreadMain, 0);
66 if (rc == ENOSYS)
67 {
68 printf("Test Skipped! OffscreenCanvas is not supported!\n");
69#ifdef REPORT_RESULT
70 REPORT_RESULT(0); // for now, report a skip as success
71#endif
72 exit(1);
73 }
74 pthread_attr_destroy(&attr);
75 threadRunning = 1;
76}
77
78void PollThreadExit(void *arg)
79{

Callers 1

mainFunction · 0.70

Calls 5

pthread_attr_initFunction · 0.85
printfFunction · 0.85
pthread_attr_destroyFunction · 0.85
exitFunction · 0.50

Tested by

no test coverage detected