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 <ntifs.h> 14 #include <ndis.h> 15 #include <xfilter.h> 16 #include <afilter.h> 17 #include <atm.h> 18 #include <ndistapi.h> 19 #include <ndisguid.h> 20 #include <debug.h> 21 22 #include "miniport.h" 23 #include "protocol.h" 24 #include "buffer.h" 25 26 /* Exported functions */ 27 #ifndef EXPORT 28 #define EXPORT NTAPI 29 #endif 30 31 /* the version of NDIS we claim to be */ 32 #define NDIS_VERSION 0x00050000 33 34 #define NDIS_TAG 0x4e4d4953 35 36 #define MIN(value1, value2) \ 37 ((value1 < value2)? value1 : value2) 38 39 #define MAX(value1, value2) \ 40 ((value1 > value2)? value1 : value2) 41 42 #define ExInterlockedRemoveEntryList(_List,_Lock) \ 43 { KIRQL OldIrql; \ 44 KeAcquireSpinLock(_Lock, &OldIrql); \ 45 RemoveEntryList(_List); \ 46 KeReleaseSpinLock(_Lock, OldIrql); \ 47 } 48 49 /* missing protypes */ 50 VOID 51 NTAPI 52 ExGetCurrentProcessorCounts( 53 PULONG ThreadKernelTime, 54 PULONG TotalCpuTime, 55 PULONG ProcessorNumber); 56 57 VOID 58 NTAPI 59 ExGetCurrentProcessorCpuUsage( 60 PULONG CpuUsage); 61 62 /* portability fixes */ 63 #ifdef _M_AMD64 64 #define KfReleaseSpinLock KeReleaseSpinLock 65 #define KefAcquireSpinLockAtDpcLevel KeAcquireSpinLockAtDpcLevel 66 #define KefReleaseSpinLockFromDpcLevel KeReleaseSpinLockFromDpcLevel 67 #endif 68 69 #endif /* __NDISSYS_H */ 70 71 /* EOF */ 72