ReactOS  0.4.15-dev-489-g75a0787
ndissys.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS NDIS library
4  * FILE: ndissys.h
5  * PURPOSE: NDIS library definitions
6  * NOTES: Spin lock acquire order:
7  * - Miniport list lock
8  * - Adapter list lock
9  */
10 #ifndef __NDISSYS_H
11 #define __NDISSYS_H
12 
13 #include <ndis.h>
14 
15 #include "debug.h"
16 #include "miniport.h"
17 #include "protocol.h"
18 #include "efilter.h"
19 #include "buffer.h"
20 
21 /* Exported functions */
22 #ifndef EXPORT
23 #define EXPORT NTAPI
24 #endif
25 
26 /* the version of NDIS we claim to be */
27 #define NDIS_VERSION 0x00050001
28 
29 #define NDIS_TAG 0x4e4d4953
30 
31 #define MIN(value1, value2) \
32  ((value1 < value2)? value1 : value2)
33 
34 #define MAX(value1, value2) \
35  ((value1 > value2)? value1 : value2)
36 
37 #define ExInterlockedRemoveEntryList(_List,_Lock) \
38  { KIRQL OldIrql; \
39  KeAcquireSpinLock(_Lock, &OldIrql); \
40  RemoveEntryList(_List); \
41  KeReleaseSpinLock(_Lock, OldIrql); \
42  }
43 
44 /* missing protypes */
45 VOID
46 NTAPI
48  PULONG ThreadKernelTime,
49  PULONG TotalCpuTime,
50  PULONG ProcessorNumber);
51 
52 VOID
53 NTAPI
55  PULONG CpuUsage);
56 
57 /* portability fixes */
58 #ifdef _M_AMD64
59 #define KfReleaseSpinLock KeReleaseSpinLock
60 #define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
61 #define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel
62 #endif
63 
64 #endif /* __NDISSYS_H */
VOID NTAPI ExGetCurrentProcessorCpuUsage(PULONG CpuUsage)
Definition: sysinfo.c:324
VOID NTAPI ExGetCurrentProcessorCounts(PULONG ThreadKernelTime, PULONG TotalCpuTime, PULONG ProcessorNumber)
Definition: sysinfo.c:345
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
unsigned int * PULONG
Definition: retypes.h:1