Fix IO memory access .. SB128 driver makes noises in VMWare - CMI is untested (Curren...
[AROS.git] / arch / i386-pc / exec / superstate.c
blob767a758be806ed09aca5909515d738440ff9bf22
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 /* Again see a real implementation for more information.
56 You will have to change into supervisor mode, and then change the
57 stack to the original user stack before returning.
60 /* We have to return something. NULL is an invalid address for a
61 stack, so it could be used to say that this function does
62 nothing.
63 */
64 return (APTR)Supervisor((ULONG_FUNC)exec_SuperState);
66 AROS_LIBFUNC_EXIT
67 } /* SuperState() */