2 Copyright © 2013, The AROS Development Team. All rights reserved.
6 #include <aros/kernel.h>
7 #include <aros/libcall.h>
9 #include <aros/arm/cpucontext.h>
11 #include <kernel_base.h>
13 #include <proto/kernel.h>
15 /* See rom/kernel/issuper.c for documentation */
17 AROS_LH0I(int, KrnIsSuper
,
18 struct KernelBase
*, KernelBase
, 13, Kernel
)
22 register unsigned int reg
;
23 asm volatile("mrs %[reg], cpsr" : [reg
] "=r" (reg
) );
25 return !(((reg
& CPUMODE_MASK
) == CPUMODE_USER
) || ((reg
& CPUMODE_MASK
) == CPUMODE_SYSTEM
));