ReactOS 0.4.16-dev-2491-g3dc6630
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 'SIDN' // "NDIS"
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 RTL_CONSTANT_LARGE_INTEGER(quad_part) {{(quad_part), (quad_part) >> 32}}
38
39#define ExInterlockedRemoveEntryList(_List,_Lock) \
40 { KIRQL OldIrql; \
41 KeAcquireSpinLock(_Lock, &OldIrql); \
42 RemoveEntryList(_List); \
43 KeReleaseSpinLock(_Lock, OldIrql); \
44 }
45
46/* missing protypes */
47VOID
50 PULONG IdleTime,
51 PULONG KernelAndUserTime,
52 PULONG ProcessorNumber);
53
54VOID
57 PULONG CpuUsage);
58
59/* portability fixes */
60#ifdef _M_AMD64
61#define KfReleaseSpinLock KeReleaseSpinLock
62#define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
63#define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel
64#endif
65
66#endif /* __NDISSYS_H */
VOID NTAPI ExGetCurrentProcessorCounts(PULONG IdleTime, PULONG KernelAndUserTime, PULONG ProcessorNumber)
Definition: sysinfo.c:345
VOID NTAPI ExGetCurrentProcessorCpuUsage(PULONG CpuUsage)
Definition: sysinfo.c:324
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36