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

Function cleanup_handler

test/pthread/test_pthread_cancel.c:18–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16_Atomic bool done_cleanup = false;
17
18void cleanup_handler(void *arg) {
19 long a = (long)arg;
20 emscripten_outf("Called clean-up handler with arg %ld", a);
21 assert(a == 42);
22 done_cleanup = true;
23}
24
25void *thread_start(void *arg) {
26 pthread_cleanup_push(cleanup_handler, (void*)42);

Callers

nothing calls this directly

Calls 2

emscripten_outfFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected