ReactOS 0.4.17-dev-1321-g5c122a9
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 TAG_CONFIG 'FCDN'
32
33#define MIN(value1, value2) \
34 ((value1 < value2)? value1 : value2)
35
36#define MAX(value1, value2) \
37 ((value1 > value2)? value1 : value2)
38
39#define RTL_CONSTANT_LARGE_INTEGER(quad_part) {{(quad_part), (quad_part) >> 32}}
40
41#define ExInterlockedRemoveEntryList(_List,_Lock) \
42 { KIRQL OldIrql; \
43 KeAcquireSpinLock(_Lock, &OldIrql); \
44 RemoveEntryList(_List); \
45 KeReleaseSpinLock(_Lock, OldIrql); \
46 }
47
48/* missing protypes */
49VOID
52 PULONG IdleTime,
53 PULONG KernelAndUserTime,
54 PULONG ProcessorNumber);
55
56VOID
59 PULONG CpuUsage);
60
61
64 IN PLOGICAL_ADAPTER Adapter);
65
66/* portability fixes */
67#ifdef _M_AMD64
68#define KfReleaseSpinLock KeReleaseSpinLock
69#define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
70#define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel
71#endif
72
73#endif /* __NDISSYS_H */
LONG NTSTATUS
Definition: precomp.h:26
VOID NTAPI ExGetCurrentProcessorCounts(PULONG IdleTime, PULONG KernelAndUserTime, PULONG ProcessorNumber)
Definition: sysinfo.c:345
NTSTATUS NdisQueryPciBusInterface(IN PLOGICAL_ADAPTER Adapter)
Definition: hardware.c:19
VOID NTAPI ExGetCurrentProcessorCpuUsage(PULONG CpuUsage)
Definition: sysinfo.c:324
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define IN
Definition: typedefs.h:39