#include <nitro/os.h>
OSProcMode OS_GetProcMode( void );
None.
Returns an OSProcMode
enumerated type that indicates the current operating mode of the ARM processor.
This function returns the current ARM Processor operation mode.
The return value is an OSProcMode
enumerated type, and will be one of the following:
Value | Operating Modes |
---|---|
OS_PROCMODE_USER | User mode |
OS_PROCMODE_FIQ | FIQ mode |
OS_PROCMODE_IRQ | IRQ mode |
OS_PROCMODE_SVC | Supervisor mode |
OS_PROCMODE_ABORT | Abort mode |
OS_PROCMODE_UNDEF | Undefined mode |
OS_PROCMODE_SYS | System mode |
Example
OSProcMode mode = OS_GetProcMode();
if ( mode == OS_PROCMODE_USER )
{
OS_Printf( "current processor mode is USERMODE.\n");
}
Gets the current processor mode from the CPSR (current program status register).
None.
2003/12/01 Initial version.
CONFIDENTIAL