Added locale item (sysmon.cd)
[AROS.git] / arch / all-mingw32 / kernel / kernel_cpu.h
blobcdff5565fbb9f6676b4247750fe725c4ca7b8394
1 #ifndef KERNEL_CPU_H_
2 #define KERNEL_CPU_H_
4 /* First include CPU-dependent definitions */
6 #ifdef __i386__
7 #include "cpu_i386.h"
8 #endif
9 #ifdef __x86_64__
10 #include "cpu_x86_64.h"
11 #endif
12 #ifdef __arm__
13 #include "cpu_arm.h"
14 #endif
16 /* This macro serves as an indicator of included file */
17 #ifndef PRINT_CPUCONTEXT
18 #error Unsupported CPU
19 #endif
21 #ifdef __AROS__
23 #define regs_t CONTEXT
25 /* Some common definitions */
26 #define cpumode_t __unused char
28 #define goSuper() 0
29 #define goUser()
30 #define goBack(mode)
32 #define AROS_EXCEPTION_SYSCALL 0x00080001
33 #define AROS_EXCEPTION_RESUME 0x00080002
35 /* Our virtual CPU interface. It's needed here for krnSysCall() definition */
36 struct KernelInterface
38 int (*core_init)(unsigned int TimerPeriod);
39 void (*core_raise)(ULONG num, const IPTR n);
40 unsigned int (*core_protect)(void *addr, unsigned int len, unsigned int prot);
41 void (*core_putc)(char c);
42 int (*core_getc)(void);
43 void (*core_alert)(const char *text);
44 void **TrapVector;
45 void **IRQVector;
46 int *SuperState;
47 int *IntState;
48 unsigned char *SleepState;
49 ULONG **LastError;
52 extern struct KernelInterface KernelIFace;
54 #define krnSysCall(n) KernelIFace.core_raise(AROS_EXCEPTION_SYSCALL, n)
56 #endif
58 /* Interrupt enable states */
59 #define INT_DISABLE 0
60 #define INT_ENABLE 1
61 #define INT_HALT -1
63 /* Sleep states */
64 #define SLEEP_MODE_OFF 0
65 #define SLEEP_MODE_PENDING 1
66 #define SLEEP_MODE_ON 2
68 #endif