xref: /reactos/sdk/include/xdk/mips/ke.h (revision c295fb95)
1c2c66affSColin Finck $if (_WDMDDK_)
2*c295fb95SHermès Bélusca-Maïto /** Kernel definitions for MIPS **/
3c2c66affSColin Finck #error MIPS Headers are totally incorrect
4c2c66affSColin Finck 
5c2c66affSColin Finck //
6c2c66affSColin Finck // Used to contain PFNs and PFN counts
7c2c66affSColin Finck //
8c2c66affSColin Finck typedef ULONG PFN_COUNT;
9c2c66affSColin Finck typedef ULONG PFN_NUMBER, *PPFN_NUMBER;
10c2c66affSColin Finck typedef LONG SPFN_NUMBER, *PSPFN_NUMBER;
11c2c66affSColin Finck 
12c2c66affSColin Finck #define PASSIVE_LEVEL                      0
13c2c66affSColin Finck #define APC_LEVEL                          1
14c2c66affSColin Finck #define DISPATCH_LEVEL                     2
15c2c66affSColin Finck #define PROFILE_LEVEL                     27
16c2c66affSColin Finck #define IPI_LEVEL                         29
17c2c66affSColin Finck #define HIGH_LEVEL                        31
18c2c66affSColin Finck 
19c2c66affSColin Finck typedef struct _KPCR {
20c2c66affSColin Finck   struct _KPRCB *Prcb;         /* 20 */
21c2c66affSColin Finck   KIRQL Irql;                  /* 24 */
22c2c66affSColin Finck   ULONG IRR;                   /* 28 */
23c2c66affSColin Finck   ULONG IDR;                   /* 30 */
24c2c66affSColin Finck } KPCR, *PKPCR;
25c2c66affSColin Finck 
26c2c66affSColin Finck #define KeGetPcr()                      PCR
27c2c66affSColin Finck 
28c2c66affSColin Finck typedef struct _KFLOATING_SAVE {
29c2c66affSColin Finck } KFLOATING_SAVE, *PKFLOATING_SAVE;
30c2c66affSColin Finck 
31c2c66affSColin Finck static __inline
32c2c66affSColin Finck ULONG
33c2c66affSColin Finck NTAPI
KeGetCurrentProcessorNumber(VOID)34c2c66affSColin Finck KeGetCurrentProcessorNumber(VOID)
35c2c66affSColin Finck {
36c2c66affSColin Finck   return 0;
37c2c66affSColin Finck }
38c2c66affSColin Finck 
39c2c66affSColin Finck #define YieldProcessor() __asm__ __volatile__("nop");
40c2c66affSColin Finck 
41c2c66affSColin Finck #define KeLowerIrql(a) KfLowerIrql(a)
42c2c66affSColin Finck #define KeRaiseIrql(a,b) *(b) = KfRaiseIrql(a)
43c2c66affSColin Finck 
44c2c66affSColin Finck NTKERNELAPI
45c2c66affSColin Finck VOID
46c2c66affSColin Finck NTAPI
47c2c66affSColin Finck KfLowerIrql(
48c2c66affSColin Finck   IN KIRQL NewIrql);
49c2c66affSColin Finck 
50c2c66affSColin Finck NTKERNELAPI
51c2c66affSColin Finck KIRQL
52c2c66affSColin Finck NTAPI
53c2c66affSColin Finck KfRaiseIrql(
54c2c66affSColin Finck   IN KIRQL NewIrql);
55c2c66affSColin Finck 
56c2c66affSColin Finck NTKERNELAPI
57c2c66affSColin Finck KIRQL
58c2c66affSColin Finck NTAPI
59c2c66affSColin Finck KeRaiseIrqlToDpcLevel(VOID);
60c2c66affSColin Finck 
61c2c66affSColin Finck NTKERNELAPI
62c2c66affSColin Finck KIRQL
63c2c66affSColin Finck NTAPI
64c2c66affSColin Finck KeRaiseIrqlToSynchLevel(VOID);
65c2c66affSColin Finck 
66c2c66affSColin Finck $endif
67