summaryrefslogtreecommitdiff
path: root/lib/sys/sys+openbsd-x64.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-09 08:53:59 +1200
committerOri Bernstein <ori@eigenstate.org>2016-05-09 08:55:15 +1200
commitd2a28cc46d5101760733f1b831287f6b9fcf1be1 (patch)
tree7828a69856bca119d4240916c30c7de8695c865b /lib/sys/sys+openbsd-x64.myr
parentc08505fb46fd8cdfee6b6f425709e5bc536f6a75 (diff)
downloadmc-d2a28cc46d5101760733f1b831287f6b9fcf1be1.tar.gz
Add support for OpenBSD thread spawning.
Diffstat (limited to 'lib/sys/sys+openbsd-x64.myr')
-rw-r--r--lib/sys/sys+openbsd-x64.myr7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/sys/sys+openbsd-x64.myr b/lib/sys/sys+openbsd-x64.myr
index a9244e8..bdf7f26 100644
--- a/lib/sys/sys+openbsd-x64.myr
+++ b/lib/sys/sys+openbsd-x64.myr
@@ -61,6 +61,12 @@ pkg sys =
nivcsw : uint64 /* involuntary context switches */
;;
+ type tforkparams = struct
+ tcb : void#
+ tid : pid#
+ stk : byte#
+ ;;
+
type statbuf = struct
mode : filemode
dev : uint32
@@ -472,6 +478,7 @@ pkg sys =
const execve : (cmd : byte[:], args : byte[:][:], env : byte[:][:] -> int64)
/* wrappers to extract wait status */
const waitstatus : (st : int32 -> waitstatus)
+ extern const __tfork_thread : (tfp : tforkparams#, sz : size, fn : void#, arg : void# -> pid)
/* fd manipulation */
const open : (path:byte[:], opts:fdopt -> fd)