summaryrefslogtreecommitdiff
path: root/lib/std/sys+linux-x64.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-28 19:33:46 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-28 19:34:45 -0700
commit7e3d48053773f02748160f3ac7fe60cdb1bb2971 (patch)
treeb4f44b6f0d70b9fb78cde620439e0119fd5d418f /lib/std/sys+linux-x64.myr
parent7deb877757f34da0a6f8fce8b2d5b5ae07178429 (diff)
downloadmc-7e3d48053773f02748160f3ac7fe60cdb1bb2971.tar.gz
Add fnclone wrapper.
Since the stack goes away, we need to ensure that the function on the stack doesn't.
Diffstat (limited to 'lib/std/sys+linux-x64.myr')
-rw-r--r--lib/std/sys+linux-x64.myr8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/sys+linux-x64.myr b/lib/std/sys+linux-x64.myr
index 4860120..1f31532 100644
--- a/lib/std/sys+linux-x64.myr
+++ b/lib/std/sys+linux-x64.myr
@@ -593,6 +593,14 @@ pkg sys =
const fork : (-> pid)
/* FIXME: where the fuck is 'struct pt_reg' defined?? */
const clone : (flags : cloneopt, stk : byte#, ptid : pid#, ctid : pid#, ptreg : byte# -> pid)
+ extern const fnclone : ( flags : cloneopt, \
+ stk : byte#, \
+ ptid : pid#, \
+ tls : byte#, \
+ ctid : pid#, \
+ ptreg : byte#, \
+ fn : (-> void) \
+ -> pid)
const wait4 : (pid:pid, loc:int32#, opt : int64, usage:rusage# -> int64)
const waitpid : (pid:pid, loc:int32#, opt : int64 -> int64)
const execv : (cmd : byte[:], args : byte[:][:] -> int64)