summaryrefslogtreecommitdiff
path: root/lib/sys/sys+netbsd-x64.myr
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sys/sys+netbsd-x64.myr')
-rw-r--r--lib/sys/sys+netbsd-x64.myr23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/sys/sys+netbsd-x64.myr b/lib/sys/sys+netbsd-x64.myr
index 8e22c0b..5fd3bb0 100644
--- a/lib/sys/sys+netbsd-x64.myr
+++ b/lib/sys/sys+netbsd-x64.myr
@@ -18,6 +18,7 @@ pkg sys =
type umtxop = int32
type signo = int32
type sigflags = int32
+ type sysarchop = int64
type clock = union
`Clockrealtime
@@ -344,6 +345,21 @@ pkg sys =
const Umtxmtxwake2 : umtxop = 22
const Umtxmax : umtxop = 23
+ /* sysarch ops */
+ const X8664getldt : sysarchop = 0
+ const X8664setldt : sysarchop = 1
+ const X8664iopl : sysarchop = 2
+ const X8664getioperm : sysarchop = 3
+ const X8664setioperm : sysarchop = 4
+ const X8664oldvm86 : sysarchop = 5
+ const X8664getmtrr : sysarchop = 11
+ const X8664setmtrr : sysarchop = 12
+ const X8664vm86 : sysarchop = 13
+ const X8664getgsbase : sysarchop = 14
+ const X8664getfsbase : sysarchop = 15
+ const X8664setgsbase : sysarchop = 16
+ const X8664setfsbase : sysarchop = 17
+
/* signal actions */
const Saonstack : sigflags = 0x0001 /* take signal on signal stack */
const Sarestart : sigflags = 0x0002 /* restart system call on signal return */
@@ -908,6 +924,9 @@ pkg sys =
new : void#, newsz : size# \
-> int)
+ /* misc */
+ const sysarch : (op : sysarchop, args : void## -> int)
+
extern const cstring : (str : byte[:] -> byte#)
/* filled by start code */
extern var __cenvp : byte##
@@ -1102,6 +1121,10 @@ const sysctl = {mib, old, oldsz, new, newsz
(mib : int#), a(mib.len), old, oldsz, new, newsz) : int)
}
+const sysarch = {op, args
+ -> (syscall(Syssysarch, op, args) : int)
+}
+
const clockid = {clk
match clk
| `Clockrealtime: -> 0