ReactOS 0.4.15-dev-7704-gc07eb9f
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 */
45VOID
48 PULONG IdleTime,
49 PULONG KernelAndUserTime,
50 PULONG ProcessorNumber);
51
52VOID
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 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