/* Define the machine-dependent type `jmp_buf'. wasm32-hwjs version. On the hwjs-cc coroutine substrate setjmp/longjmp are NOT functions: the HwjsCoroutinize pass intercepts every setjmp/longjmp call site at IR level and lowers it through the continuation machinery (same-frame transfers -> in-frame resume; cross-frame -> cooperative marker-driven unwind across arena frames). There is no host syscall, no Asyncify buffer, and NO stack snapshot in the jmp_buf. What the runtime persists in the jmp_buf is the O(1) hwjs setjmp record {owner_off, gen, selector} (12 bytes); the rest is headroom for ABI evolution. The buffer is value-typed and trivially byte-copyable: a copied __jmp_buf is exactly as valid as its original (the meaning is an arena offset + generation, position-independent), and a stale copy traps on the generation check rather than landing silently. This MUST stay byte-compatible with the musl wasm32 port (packages/modified/musl/arch/wasm32/bits/setjmp.h: unsigned long[8] = 32 B) so both libcs present the same jmp_buf ABI on this target. Any unlowered setjmp/longjmp call has no out-of-line definition and FAILS AT LINK (deliberate, loud). See docs/HWJS-3-USERLAND-DESIGN.md and HWJS-B-1-OPENER.md. STATUS-CHANNEL ARM (drive_abi=4, HWJS_STATUS_CHANNEL=1 -- NOT the default; STATUS-CHANNEL-CONTRACT sec. 6): under the unified status channel the record at offset 0 is instead a u64 ACTIVATION ID drawn per setjmp-site activation by the RT op __hwjs_status_sj_register (per-process counter, starts at 1; 0 = "no setjmp ever initialized this buffer", a loud refusal at longjmp). The remaining 24 bytes are unspecified. Identity rides IN the bytes, so byte-copied jmp_bufs keep working (a restored old copy carries the old id, which still matches the untouched ancestor's frame slot); an id matching NO live registration propagates to the drive terminus and aborts loudly there, never a silent wrong-frame landing. sigsetjmp mask save/restore stays libc-composed OUTSIDE the core record on both arms. jmp_buf SIZE (32 B) and the fails-at-link posture are IDENTICAL on both arms. */ #ifndef _BITS_SETJMP_H #define _BITS_SETJMP_H 1 #if !defined _SETJMP_H && !defined _PTHREAD_H # error "Never include directly; use instead." #endif typedef unsigned long int __jmp_buf[8]; #endif /* bits/setjmp.h */