revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / exec / supervisor.c
blob99a4e0fdf614336aa07d0bd4dd83a8cf8415d932
1 /*
2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: Supervisor() - Execute some code in a privileged environment.
6 Lang: english
7 */
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)
18 AROS_LIBFUNC_INIT
20 IPTR retval;
22 /* Put function pointer into e(r)dx because on x86-64 it doesn't require additional reload */
23 __asm__ __volatile__ ("int $0xfe":"=a"(retval):"a"(SC_SUPERVISOR),"D"(userFunction));
24 return retval;
26 AROS_LIBFUNC_EXIT
27 } /* Supervisor() */