Skip to content

Commit df821a4

Browse files
committed
Remove proc_raise and the signal types and constants.
WebAssembly doesn't support signal handling, so these weren't useful for their main purpose. The one thing you could do with `proc_raise` was terminate execution with a signal status, however that's not super useful and even wasi-libc didn't make use of it in its abort function.
1 parent db73914 commit df821a4

File tree

3 files changed

+0
-308
lines changed

3 files changed

+0
-308
lines changed

phases/ephemeral/docs/wasi_ephemeral_preview.md

Lines changed: 0 additions & 201 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ modules so that embedders need not implement all of it.
106106
- [`__wasi_path_unlink_file()`](#path_unlink_file)
107107
- [`__wasi_poll_oneoff()`](#poll_oneoff)
108108
- [`__wasi_proc_exit()`](#proc_exit)
109-
- [`__wasi_proc_raise()`](#proc_raise)
110109
- [`__wasi_random_get()`](#random_get)
111110
- [`__wasi_sched_yield()`](#sched_yield)
112111
- [`__wasi_sock_recv()`](#sock_recv)
@@ -951,18 +950,6 @@ Inputs:
951950

952951
Does not return.
953952

954-
### <a href="#proc_raise" name="proc_raise"></a>`__wasi_proc_raise()`
955-
956-
Send a signal to the process of the calling thread.
957-
958-
Note: This is similar to `raise` in POSIX.
959-
960-
Inputs:
961-
962-
- <a href="#proc_raise.sig" name="proc_raise.sig"></a><code>[\_\_wasi\_signal\_t](#signal) <strong>sig</strong></code>
963-
964-
The signal condition to trigger.
965-
966953
### <a href="#random_get" name="random_get"></a>`__wasi_random_get()`
967954

968955
Write high-quality random data into a buffer.
@@ -2057,194 +2044,6 @@ defined, it must be set to zero.
20572044

20582045
Used by [`__wasi_sock_send()`](#sock_send).
20592046

2060-
### <a href="#signal" name="signal"></a>`__wasi_signal_t` (`uint8_t`)
2061-
2062-
Signal condition.
2063-
2064-
Used by [`__wasi_proc_raise()`](#proc_raise).
2065-
2066-
Possible values:
2067-
2068-
- <a href="#signal.hup" name="signal.hup"></a>**`__WASI_SIGHUP`**
2069-
2070-
Hangup.
2071-
2072-
Action: Terminates the process.
2073-
2074-
- <a href="#signal.int" name="signal.int"></a>**`__WASI_SIGINT`**
2075-
2076-
Terminate interrupt signal.
2077-
2078-
Action: Terminates the process.
2079-
2080-
- <a href="#signal.quit" name="signal.quit"></a>**`__WASI_SIGQUIT`**
2081-
2082-
Terminal quit signal.
2083-
2084-
Action: Terminates the process.
2085-
2086-
- <a href="#signal.ill" name="signal.ill"></a>**`__WASI_SIGILL`**
2087-
2088-
Illegal instruction.
2089-
2090-
Action: Terminates the process.
2091-
2092-
- <a href="#signal.trap" name="signal.trap"></a>**`__WASI_SIGTRAP`**
2093-
2094-
Trace/breakpoint trap.
2095-
2096-
Action: Terminates the process.
2097-
2098-
- <a href="#signal.abrt" name="signal.abrt"></a>**`__WASI_SIGABRT`**
2099-
2100-
Process abort signal.
2101-
2102-
Action: Terminates the process.
2103-
2104-
- <a href="#signal.bus" name="signal.bus"></a>**`__WASI_SIGBUS`**
2105-
2106-
Access to an undefined portion of a memory object.
2107-
2108-
Action: Terminates the process.
2109-
2110-
- <a href="#signal.fpe" name="signal.fpe"></a>**`__WASI_SIGFPE`**
2111-
2112-
Erroneous arithmetic operation.
2113-
2114-
Action: Terminates the process.
2115-
2116-
- <a href="#signal.kill" name="signal.kill"></a>**`__WASI_SIGKILL`**
2117-
2118-
Kill.
2119-
2120-
Action: Terminates the process.
2121-
2122-
- <a href="#signal.usr1" name="signal.usr1"></a>**`__WASI_SIGUSR1`**
2123-
2124-
User-defined signal 1.
2125-
2126-
Action: Terminates the process.
2127-
2128-
- <a href="#signal.segv" name="signal.segv"></a>**`__WASI_SIGSEGV`**
2129-
2130-
Invalid memory reference.
2131-
2132-
Action: Terminates the process.
2133-
2134-
- <a href="#signal.usr2" name="signal.usr2"></a>**`__WASI_SIGUSR2`**
2135-
2136-
User-defined signal 2.
2137-
2138-
Action: Terminates the process.
2139-
2140-
- <a href="#signal.pipe" name="signal.pipe"></a>**`__WASI_SIGPIPE`**
2141-
2142-
Write on a pipe with no one to read it.
2143-
2144-
Action: Ignored.
2145-
2146-
- <a href="#signal.alrm" name="signal.alrm"></a>**`__WASI_SIGALRM`**
2147-
2148-
Alarm clock.
2149-
2150-
Action: Terminates the process.
2151-
2152-
- <a href="#signal.term" name="signal.term"></a>**`__WASI_SIGTERM`**
2153-
2154-
Termination signal.
2155-
2156-
Action: Terminates the process.
2157-
2158-
- <a href="#signal.chld" name="signal.chld"></a>**`__WASI_SIGCHLD`**
2159-
2160-
Child process terminated, stopped, or continued.
2161-
2162-
Action: Ignored.
2163-
2164-
- <a href="#signal.cont" name="signal.cont"></a>**`__WASI_SIGCONT`**
2165-
2166-
Continue executing, if stopped.
2167-
2168-
Action: Continues executing, if stopped.
2169-
2170-
- <a href="#signal.stop" name="signal.stop"></a>**`__WASI_SIGSTOP`**
2171-
2172-
Stop executing.
2173-
2174-
Action: Stops executing.
2175-
2176-
- <a href="#signal.tstp" name="signal.tstp"></a>**`__WASI_SIGTSTP`**
2177-
2178-
Terminal stop signal.
2179-
2180-
Action: Stops executing.
2181-
2182-
- <a href="#signal.ttin" name="signal.ttin"></a>**`__WASI_SIGTTIN`**
2183-
2184-
Background process attempting read.
2185-
2186-
Action: Stops executing.
2187-
2188-
- <a href="#signal.ttou" name="signal.ttou"></a>**`__WASI_SIGTTOU`**
2189-
2190-
Background process attempting write.
2191-
2192-
Action: Stops executing.
2193-
2194-
- <a href="#signal.urg" name="signal.urg"></a>**`__WASI_SIGURG`**
2195-
2196-
High bandwidth data is available at a socket.
2197-
2198-
Action: Ignored.
2199-
2200-
- <a href="#signal.xcpu" name="signal.xcpu"></a>**`__WASI_SIGXCPU`**
2201-
2202-
CPU time limit exceeded.
2203-
2204-
Action: Terminates the process.
2205-
2206-
- <a href="#signal.xfsz" name="signal.xfsz"></a>**`__WASI_SIGXFSZ`**
2207-
2208-
File size limit exceeded.
2209-
2210-
Action: Terminates the process.
2211-
2212-
- <a href="#signal.vtalrm" name="signal.vtalrm"></a>**`__WASI_SIGVTALRM`**
2213-
2214-
Virtual timer expired.
2215-
2216-
Action: Terminates the process.
2217-
2218-
- <a href="#signal.prof" name="signal.prof"></a>**`__WASI_SIGPROF`**
2219-
2220-
Profiling timer expired.
2221-
2222-
Action: Terminates the process.
2223-
2224-
- <a href="#signal.winch" name="signal.winch"></a>**`__WASI_SIGWINCH`**
2225-
2226-
Window changed.
2227-
2228-
Action: Ignored.
2229-
2230-
- <a href="#signal.poll" name="signal.poll"></a>**`__WASI_SIGPOLL`**
2231-
2232-
I/O possible.
2233-
2234-
Action: Terminates the process.
2235-
2236-
- <a href="#signal.pwr" name="signal.pwr"></a>**`__WASI_SIGPWR`**
2237-
2238-
Power failure.
2239-
2240-
Action: Terminates the process.
2241-
2242-
- <a href="#signal.sys" name="signal.sys"></a>**`__WASI_SIGSYS`**
2243-
2244-
Bad system call.
2245-
2246-
Action: Terminates the process.
2247-
22482047
### <a href="#subclockflags" name="subclockflags"></a>`__wasi_subclockflags_t` (`uint16_t` bitfield)
22492048

22502049
Flags determining how to interpret the timestamp provided in

phases/ephemeral/witx/typenames.witx

Lines changed: 0 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -601,105 +601,6 @@
601601
;;; Exit code generated by a process when exiting.
602602
(typename $exitcode u32)
603603

604-
;;; Signal condition.
605-
(typename $signal
606-
(enum u8
607-
;;; No signal. Note that POSIX has special semantics for `kill(pid, 0)`,
608-
;;; so this value is reserved.
609-
$none
610-
;;; Hangup.
611-
;;; Action: Terminates the process.
612-
$hup
613-
;;; Terminate interrupt signal.
614-
;;; Action: Terminates the process.
615-
$int
616-
;;; Terminal quit signal.
617-
;;; Action: Terminates the process.
618-
$quit
619-
;;; Illegal instruction.
620-
;;; Action: Terminates the process.
621-
$ill
622-
;;; Trace/breakpoint trap.
623-
;;; Action: Terminates the process.
624-
$trap
625-
;;; Process abort signal.
626-
;;; Action: Terminates the process.
627-
$abrt
628-
;;; Access to an undefined portion of a memory object.
629-
;;; Action: Terminates the process.
630-
$bus
631-
;;; Erroneous arithmetic operation.
632-
;;; Action: Terminates the process.
633-
$fpe
634-
;;; Kill.
635-
;;; Action: Terminates the process.
636-
$kill
637-
;;; User-defined signal 1.
638-
;;; Action: Terminates the process.
639-
$usr1
640-
;;; Invalid memory reference.
641-
;;; Action: Terminates the process.
642-
$segv
643-
;;; User-defined signal 2.
644-
;;; Action: Terminates the process.
645-
$usr2
646-
;;; Write on a pipe with no one to read it.
647-
;;; Action: Ignored.
648-
$pipe
649-
;;; Alarm clock.
650-
;;; Action: Terminates the process.
651-
$alrm
652-
;;; Termination signal.
653-
;;; Action: Terminates the process.
654-
$term
655-
;;; Child process terminated, stopped, or continued.
656-
;;; Action: Ignored.
657-
$chld
658-
;;; Continue executing, if stopped.
659-
;;; Action: Continues executing, if stopped.
660-
$cont
661-
;;; Stop executing.
662-
;;; Action: Stops executing.
663-
$stop
664-
;;; Terminal stop signal.
665-
;;; Action: Stops executing.
666-
$tstp
667-
;;; Background process attempting read.
668-
;;; Action: Stops executing.
669-
$ttin
670-
;;; Background process attempting write.
671-
;;; Action: Stops executing.
672-
$ttou
673-
;;; High bandwidth data is available at a socket.
674-
;;; Action: Ignored.
675-
$urg
676-
;;; CPU time limit exceeded.
677-
;;; Action: Terminates the process.
678-
$xcpu
679-
;;; File size limit exceeded.
680-
;;; Action: Terminates the process.
681-
$xfsz
682-
;;; Virtual timer expired.
683-
;;; Action: Terminates the process.
684-
$vtalrm
685-
;;; Profiling timer expired.
686-
;;; Action: Terminates the process.
687-
$prof
688-
;;; Window changed.
689-
;;; Action: Ignored.
690-
$winch
691-
;;; I/O possible.
692-
;;; Action: Terminates the process.
693-
$poll
694-
;;; Power failure.
695-
;;; Action: Terminates the process.
696-
$pwr
697-
;;; Bad system call.
698-
;;; Action: Terminates the process.
699-
$sys
700-
)
701-
)
702-
703604
;;; Flags provided to `sock_recv`.
704605
(typename $riflags
705606
(flags u16

phases/ephemeral/witx/wasi_ephemeral_preview.witx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,6 @@
463463
(param $rval $exitcode)
464464
)
465465

466-
;;; Send a signal to the process of the calling thread.
467-
;;; Note: This is similar to `raise` in POSIX.
468-
(@interface func (export "proc_raise")
469-
;;; The signal condition to trigger.
470-
(param $sig $signal)
471-
(result $error $errno)
472-
)
473-
474466
;;; Temporarily yield execution of the calling thread.
475467
;;; Note: This is similar to `sched_yield` in POSIX.
476468
(@interface func (export "sched_yield")

0 commit comments

Comments
 (0)