2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 Desc: Supervisor() - Execute some code in a privileged environment.
9 #include <aros/libcall.h>
10 #include <exec/execbase.h>
12 #include "kernel_syscall.h"
14 AROS_LH1I(IPTR
, Supervisor
,
15 AROS_LHA(void *, userFunction
, A5
),
16 struct ExecBase
*, SysBase
, 5, Exec
)
22 /* Put function pointer into e(r)dx because on x86-64 it doesn't require additional reload */
23 __asm__
__volatile__ ("int $0x80":"=a"(retval
):"a"(SC_SUPERVISOR
),"D"(userFunction
));