Re-enabled use of AROS.Boot file due to lack of general enthusiasm for
[tangerine.git] / arch / i386-pc / exec / superstate.c
blob8800f9501053f98ee91717bd1d5c426e8c7722e8
1 /*
2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3 $Id$
5 Desc: SuperState() - Switch the processor into a higher plane.
6 Lang: english
7 */
9 void exec_SuperState(); /* defined in corelow.S */
11 /*****************************************************************************
13 NAME */
14 #include <proto/exec.h>
16 AROS_LH0(APTR, SuperState,
18 /* LOCATION */
19 struct ExecBase *, SysBase, 25, Exec)
21 /* FUNCTION
22 Enter supervisor mode (like Supervisor()), but return on the user
23 stack. This will mean that the user stack variables are still there.
24 A call to UserState() will end this mode.
26 INPUTS
27 None.
29 RESULT
30 The old supervisor stack. This must be passed to UserState(). If the
31 processor was already in supervisor mode, then this function will
32 return NULL. In that case do NOT call UserState().
34 NOTES
35 This is not a good function to use, it has limited scope, and will
36 probably be even less useful in the future.
38 EXAMPLE
40 BUGS
41 You can easily cause your system to cease operating normally.
43 SEE ALSO
44 Supervisor(), UserState()
46 INTERNALS
47 For extra details see Supervisor().
49 HISTORY
51 ******************************************************************************/
53 AROS_LIBFUNC_INIT
54 APTR retval;
55 /* Again see a real implementation for more information.
57 You will have to change into supervisor mode, and then change the
58 stack to the original user stack before returning.
61 /* We have to return something. NULL is an invalid address for a
62 stack, so it could be used to say that this function does
63 nothing.
64 */
65 return (APTR)Supervisor(exec_SuperState);
67 AROS_LIBFUNC_EXIT
68 } /* SuperState() */