shithub: mc

Download patch

ref: a4fdef8a867263627510ea20e9b4a758549f7c98
parent: 4696e9dc4fda1400c881f2177183da3b024633f1
author: Ori Bernstein <ori@eigenstate.org>
date: Wed Mar 13 20:34:03 EDT 2019

Add explicit abi conversions for syscall args.

	Sure, the types happen to work, but consistency is nice.

--- a/lib/sys/sys+osx-x64.myr
+++ b/lib/sys/sys+osx-x64.myr
@@ -1102,15 +1102,15 @@
 const sysctl = {mib, old, oldsz, new, newsz
 	/* all args already passed through a() or ar  ptrs */
 	-> (syscall(Sys__sysctl, \
-		(mib : int#), a(mib.len), old, oldsz, new, newsz) : int)
+		(mib : int#), a(mib.len), a(old), a(oldsz), a(new), a(newsz)) : int)
 }
 
 const ulock_wait = {op, uaddr, val, timeout
-	-> (syscall(Sysulock_wait, a(op), uaddr, val, a(timeout)) : int)
+	-> (syscall(Sysulock_wait, a(op), a(uaddr), a(val), a(timeout)) : int)
 }
 
 const ulock_wake = {op, uaddr, wakeval
-	-> (syscall(Sysulock_wake, a(op), uaddr, wakeval) : int)
+	-> (syscall(Sysulock_wake, a(op), a(uaddr), a(wakeval)) : int)
 }
 
 const waitstatus = {st