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

Function cleanup_handler1

test/pthread/test_pthread_cleanup.c:17–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15int32_t cleanup_state = 1;
16
17static void cleanup_handler1(void *arg) {
18 cleanup_state <<= 2;
19 // Perform non-commutative arithmetic to a global var that encodes the cleanup stack order ops.
20 cleanup_state *= (intptr_t)arg;
21 printf("Called clean-up handler 1 with arg %p (state=%d)\n", arg, cleanup_state);
22}
23
24static void cleanup_handler2(void *arg) {
25 cleanup_state <<= 3;

Callers

nothing calls this directly

Calls 1

printfFunction · 0.85

Tested by

no test coverage detected