vxsys.h - vx32 - Local 9vx git repository for patches.
(HTM) git clone git://r-36.net/vx32
(DIR) Log
(DIR) Files
(DIR) Refs
---
vxsys.h (867B)
---
1 //
2 // Definitions used within VX environments
3 // to invoke VX system calls and parent calls.
4 //
5 #ifndef _VXSYS_H_
6 #define _VXSYS_H_
7
8
9 // VX parent-calls take the parent-call code and flags in EAX,
10 // If the VXPC_SENDBUF flag is set, EBX points to a message to send
11 // and EDX contains the message's length in bytes.
12 // The ECX register cannot be used for call or return arguments,
13 // as it is used as a temporary by the SYSCALL instruction.
14 // All other registers are simple register arguments to the parent.
15 #define VXPCALL(a, s1, s2, r1, r2) \
16 asm volatile("syscall" \
17 : "=a" (a), "=b" (s1), "=d" (s2) \
18 : "a" (a), "b" (s1), "d" (s2), "S" (r1), "D" (r2) \
19 : "ecx");
20
21
22 static inline void vxsetperm(void *addr, size_t size, int perm)
23 {
24 asm volatile("syscall"
25 :
26 : "a" (VXSYS_SETPERM), "b" (addr), "d" (size), "S" (perm)
27 : "ecx");
28 }
29
30 #endif // _VXSYS_H_