summaryrefslogtreecommitdiff
path: root/libstd/waitstatus+freebsd.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-10-03 13:22:46 -0400
committerOri Bernstein <ori@eigenstate.org>2014-10-03 13:22:46 -0400
commite898ab8413e852b6f097e047157093014246c9a2 (patch)
treeaeb8109049da225cddad3fa232edfce831bc0f76 /libstd/waitstatus+freebsd.myr
parentf13090387d3a76daf8b531cb2e8bfa7e26b6f344 (diff)
downloadmc-e898ab8413e852b6f097e047157093014246c9a2.tar.gz
Use '+' as the system separator.
Diffstat (limited to 'libstd/waitstatus+freebsd.myr')
-rw-r--r--libstd/waitstatus+freebsd.myr20
1 files changed, 20 insertions, 0 deletions
diff --git a/libstd/waitstatus+freebsd.myr b/libstd/waitstatus+freebsd.myr
new file mode 100644
index 0000000..2769074
--- /dev/null
+++ b/libstd/waitstatus+freebsd.myr
@@ -0,0 +1,20 @@
+use "die.use"
+
+pkg std =
+ type waitstatus = union
+ `Waitexit int32
+ `Waitsig int32
+ `Waitstop int32
+ ;;
+
+ const waitstatus : (st : int32 -> waitstatus)
+;;
+
+const waitstatus = {st
+ match st & 0o177
+ | 0: -> `Waitexit (st >> 8)
+ | 0x7f:-> `Waitstop (st >> 8)
+ | sig: -> `Waitsig sig
+ ;;
+ die("unreachable")
+}