revert between 56095 -> 55830 in arch
[AROS.git] / arch / ppc-chrp / exec / supervisor.c
blobf02cac14b007a225be23d915fcda9a8dd8ff4bf1
1 /*
2 Copyright © 1995-2013, 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 <proto/exec.h>
11 /* See rom/exec/supervisor.c for documentation */
13 AROS_LH1(ULONG, Supervisor,
14 AROS_LHA(ULONG_FUNC, userFunction, A5),
15 struct ExecBase *, SysBase, 5, Exec)
17 AROS_LIBFUNC_INIT
19 register ULONG retval;
20 register APTR stack;
22 stack = SuperState();
24 retval = (*userFunction)();
26 UserState(stack);
28 return retval;
30 AROS_LIBFUNC_EXIT
31 } /* Supervisor() */