#define __WASI_ROFLAGS_RECV_DATA_TRUNCATED ((__wasi_roflags_t)(1 << 0))
#define __WASI_SDFLAGS_RD ((__wasi_sdflags_t)(1 << 0))
#define __WASI_SDFLAGS_WR ((__wasi_sdflags_t)(1 << 1))
-#define __WASI_SIGNAL_ABRT (UINT8_C(6))
-#define __WASI_SIGNAL_ALRM (UINT8_C(14))
-#define __WASI_SIGNAL_BUS (UINT8_C(7))
-#define __WASI_SIGNAL_CHLD (UINT8_C(16))
-#define __WASI_SIGNAL_CONT (UINT8_C(17))
-#define __WASI_SIGNAL_FPE (UINT8_C(8))
-#define __WASI_SIGNAL_HUP (UINT8_C(1))
-#define __WASI_SIGNAL_ILL (UINT8_C(4))
-#define __WASI_SIGNAL_INT (UINT8_C(2))
-#define __WASI_SIGNAL_KILL (UINT8_C(9))
-#define __WASI_SIGNAL_NONE (UINT8_C(0))
-#define __WASI_SIGNAL_PIPE (UINT8_C(13))
-#define __WASI_SIGNAL_POLL (UINT8_C(28))
-#define __WASI_SIGNAL_PROF (UINT8_C(26))
-#define __WASI_SIGNAL_PWR (UINT8_C(29))
-#define __WASI_SIGNAL_QUIT (UINT8_C(3))
-#define __WASI_SIGNAL_SEGV (UINT8_C(11))
-#define __WASI_SIGNAL_STOP (UINT8_C(18))
-#define __WASI_SIGNAL_SYS (UINT8_C(30))
-#define __WASI_SIGNAL_TERM (UINT8_C(15))
-#define __WASI_SIGNAL_TRAP (UINT8_C(5))
-#define __WASI_SIGNAL_TSTP (UINT8_C(19))
-#define __WASI_SIGNAL_TTIN (UINT8_C(20))
-#define __WASI_SIGNAL_TTOU (UINT8_C(21))
-#define __WASI_SIGNAL_URG (UINT8_C(22))
-#define __WASI_SIGNAL_USR1 (UINT8_C(10))
-#define __WASI_SIGNAL_USR2 (UINT8_C(12))
-#define __WASI_SIGNAL_VTALRM (UINT8_C(25))
-#define __WASI_SIGNAL_WINCH (UINT8_C(27))
-#define __WASI_SIGNAL_XCPU (UINT8_C(23))
-#define __WASI_SIGNAL_XFSZ (UINT8_C(24))
#define __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME ((__wasi_subclockflags_t)(1 << 0))
#define __WASI_WHENCE_CUR (UINT8_C(1))
#define __WASI_WHENCE_END (UINT8_C(2))
_Static_assert(sizeof(__wasi_exitcode_t) == 4, "witx calculated size");
_Static_assert(_Alignof(__wasi_exitcode_t) == 4, "witx calculated align");
-/**
- * Signal condition.
- */
-typedef uint8_t __wasi_signal_t;
-
-/**
- * No signal. Note that POSIX has special semantics for `kill(pid, 0)`,
- * so this value is reserved.
- */
-#define __WASI_SIGNAL_NONE (UINT8_C(0))
-
-/**
- * Hangup.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_HUP (UINT8_C(1))
-
-/**
- * Terminate interrupt signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_INT (UINT8_C(2))
-
-/**
- * Terminal quit signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_QUIT (UINT8_C(3))
-
-/**
- * Illegal instruction.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ILL (UINT8_C(4))
-
-/**
- * Trace/breakpoint trap.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_TRAP (UINT8_C(5))
-
-/**
- * Process abort signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ABRT (UINT8_C(6))
-
-/**
- * Access to an undefined portion of a memory object.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_BUS (UINT8_C(7))
-
-/**
- * Erroneous arithmetic operation.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_FPE (UINT8_C(8))
-
-/**
- * Kill.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_KILL (UINT8_C(9))
-
-/**
- * User-defined signal 1.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_USR1 (UINT8_C(10))
-
-/**
- * Invalid memory reference.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_SEGV (UINT8_C(11))
-
-/**
- * User-defined signal 2.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_USR2 (UINT8_C(12))
-
-/**
- * Write on a pipe with no one to read it.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_PIPE (UINT8_C(13))
-
-/**
- * Alarm clock.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_ALRM (UINT8_C(14))
-
-/**
- * Termination signal.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_TERM (UINT8_C(15))
-
-/**
- * Child process terminated, stopped, or continued.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_CHLD (UINT8_C(16))
-
-/**
- * Continue executing, if stopped.
- * Action: Continues executing, if stopped.
- */
-#define __WASI_SIGNAL_CONT (UINT8_C(17))
-
-/**
- * Stop executing.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_STOP (UINT8_C(18))
-
-/**
- * Terminal stop signal.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TSTP (UINT8_C(19))
-
-/**
- * Background process attempting read.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TTIN (UINT8_C(20))
-
-/**
- * Background process attempting write.
- * Action: Stops executing.
- */
-#define __WASI_SIGNAL_TTOU (UINT8_C(21))
-
-/**
- * High bandwidth data is available at a socket.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_URG (UINT8_C(22))
-
-/**
- * CPU time limit exceeded.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_XCPU (UINT8_C(23))
-
-/**
- * File size limit exceeded.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_XFSZ (UINT8_C(24))
-
-/**
- * Virtual timer expired.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_VTALRM (UINT8_C(25))
-
-/**
- * Profiling timer expired.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_PROF (UINT8_C(26))
-
-/**
- * Window changed.
- * Action: Ignored.
- */
-#define __WASI_SIGNAL_WINCH (UINT8_C(27))
-
-/**
- * I/O possible.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_POLL (UINT8_C(28))
-
-/**
- * Power failure.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_PWR (UINT8_C(29))
-
-/**
- * Bad system call.
- * Action: Terminates the process.
- */
-#define __WASI_SIGNAL_SYS (UINT8_C(30))
-
-_Static_assert(sizeof(__wasi_signal_t) == 1, "witx calculated size");
-_Static_assert(_Alignof(__wasi_signal_t) == 1, "witx calculated align");
-
/**
* Flags provided to `sock_recv`.
*/
*/
__wasi_exitcode_t rval
);
-/**
- * Send a signal to the process of the calling thread.
- * Note: This is similar to `raise` in POSIX.
- */
-__wasi_errno_t __wasi_proc_raise(
- /**
- * The signal condition to trigger.
- */
- __wasi_signal_t sig
-) __attribute__((__warn_unused_result__));
/**
* Temporarily yield execution of the calling thread.
* Note: This is similar to `sched_yield` in POSIX.