1 /*****************************************************************************
4 #include <proto/kernel.h>
6 AROS_LH0I(int, KrnIsSuper,
11 struct KernelBase *, KernelBase, 13, Kernel)
14 Determine if the caller is running in supervisor mode
20 Nonzero for supervisor mode, zero for user mode
23 Callers should only test the return value against zero.
24 Nonzero values may actually be different, since they
25 may carry some private implementation-dependent information
26 (like CPU privilege level, for example).
36 ******************************************************************************/
37 #include "aros/m68k/asm.h"
41 .globl AROS_SLIB_ENTRY(KrnIsSuper,Kernel,13)
42 .globl Kernel_Is_Super
44 AROS_SLIB_ENTRY(KrnIsSuper,Kernel,13):
46 /* 68010+ privilege violation exception handler checks for this special case.
47 * (move from SR is not privileged on 68000) */
49 /* If above instruction caused exception, exception handler returns here */