2000-08-01 18:43:15 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS NDIS library
|
|
|
|
* FILE: ndissys.h
|
|
|
|
* PURPOSE: NDIS library definitions
|
|
|
|
* NOTES: Spin lock acquire order:
|
|
|
|
* - Miniport list lock
|
|
|
|
* - Adapter list lock
|
|
|
|
*/
|
|
|
|
#ifndef __NDISSYS_H
|
|
|
|
#define __NDISSYS_H
|
|
|
|
|
2002-09-08 10:23:54 +00:00
|
|
|
#include <ndis.h>
|
2006-01-07 21:38:40 +00:00
|
|
|
|
2014-02-03 00:03:57 +00:00
|
|
|
#include "debug.h"
|
2004-08-15 23:12:33 +00:00
|
|
|
#include "miniport.h"
|
|
|
|
#include "protocol.h"
|
2011-07-27 19:31:48 +00:00
|
|
|
#include "efilter.h"
|
2009-06-13 05:51:44 +00:00
|
|
|
#include "buffer.h"
|
2000-08-01 18:43:15 +00:00
|
|
|
|
2002-09-08 10:23:54 +00:00
|
|
|
/* Exported functions */
|
2005-08-23 22:11:03 +00:00
|
|
|
#ifndef EXPORT
|
|
|
|
#define EXPORT NTAPI
|
2002-09-08 10:23:54 +00:00
|
|
|
#endif
|
|
|
|
|
2009-06-23 14:09:59 +00:00
|
|
|
/* the version of NDIS we claim to be */
|
2011-10-05 20:36:20 +00:00
|
|
|
#define NDIS_VERSION 0x00050001
|
2009-06-23 14:09:59 +00:00
|
|
|
|
2004-12-18 19:32:40 +00:00
|
|
|
#define NDIS_TAG 0x4e4d4953
|
2002-09-08 10:23:54 +00:00
|
|
|
|
2000-08-27 16:31:41 +00:00
|
|
|
#define MIN(value1, value2) \
|
|
|
|
((value1 < value2)? value1 : value2)
|
|
|
|
|
|
|
|
#define MAX(value1, value2) \
|
|
|
|
((value1 > value2)? value1 : value2)
|
|
|
|
|
2006-05-08 11:00:26 +00:00
|
|
|
#define ExInterlockedRemoveEntryList(_List,_Lock) \
|
|
|
|
{ KIRQL OldIrql; \
|
|
|
|
KeAcquireSpinLock(_Lock, &OldIrql); \
|
|
|
|
RemoveEntryList(_List); \
|
|
|
|
KeReleaseSpinLock(_Lock, OldIrql); \
|
|
|
|
}
|
|
|
|
|
2008-03-22 00:38:09 +00:00
|
|
|
/* missing protypes */
|
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
ExGetCurrentProcessorCounts(
|
2023-01-24 04:42:03 +00:00
|
|
|
PULONG IdleTime,
|
|
|
|
PULONG KernelAndUserTime,
|
2008-03-22 00:38:09 +00:00
|
|
|
PULONG ProcessorNumber);
|
|
|
|
|
2009-05-03 14:38:13 +00:00
|
|
|
VOID
|
|
|
|
NTAPI
|
|
|
|
ExGetCurrentProcessorCpuUsage(
|
|
|
|
PULONG CpuUsage);
|
|
|
|
|
2015-04-30 22:09:11 +00:00
|
|
|
/* portability fixes */
|
|
|
|
#ifdef _M_AMD64
|
|
|
|
#define KfReleaseSpinLock KeReleaseSpinLock
|
|
|
|
#define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel
|
|
|
|
#define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel
|
|
|
|
#endif
|
|
|
|
|
2000-08-01 18:43:15 +00:00
|
|
|
#endif /* __NDISSYS_H */
|