Documented GVF_SAVE_VAR alongside other flags, and removed a query/doubt
[AROS.git] / arch / ppc-sam440 / exec / supervisor.c
blobdb99c98a06f74c985f95c512c1e985e69a14e92b
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>
10 #include <asm/amcc440.h>
12 /* See rom/exec/supervisor.c for documentation */
14 AROS_LH1(ULONG, Supervisor,
15 AROS_LHA(ULONG_FUNC, userFunction, A5),
16 struct ExecBase *, SysBase, 5, Exec)
18 AROS_LIBFUNC_INIT
20 register ULONG retval;
21 register APTR stack;
23 stack = SuperState();
25 retval = (*userFunction)();
27 UserState(stack);
29 return retval;
31 AROS_LIBFUNC_EXIT
32 } /* Supervisor() */