osdep.h
来自「ndis windows网络驱动程序的范例」· C头文件 代码 · 共 84 行
H
84 行
/*++
Copyright (c) 1996 Microsoft Corporation
Module Name:
osdep.h
Abstract:
defines for OS specific routines
Author:
Jim Mateer
Revision History:
--*/
#ifndef _OSDEP_
#define _OSDEP_
#if BINARY_COMPATIBLE
//
// shortest timer period in microsecs
//
#define TIMER_GRANULARITY 1000
typedef ULONG KSPIN_LOCK, *PKSPIN_LOCK; // For ExInterlockedAddLargeInteger
#define ExInterlockedAddLargeInteger( _add, _inc, _lock ) (_add)->QuadPart += (_inc).QuadPart
#define PAGED_CODE()
//
// interlocked routines degenerate to the trivial case
//
#define InterlockedIncrement( _a ) (++(*(_a)))
//
// MM system size stuff. Define away the query routine to make medium
// the default size
//
typedef enum _MM_SYSTEM_SIZE {
MmSmallSystem,
MmMediumSystem,
MmLargeSystem
} MM_SYSTEMSIZE;
#define MmQuerySystemSize() MmMediumSystem
#else // BINARY_COMPATIBLE
//
// shortest timer period in microsecs
//
#define TIMER_GRANULARITY 10000
#endif // BINARY_COMPATIBLE
//
// convert from microseconds to 100ns units and vice versa
//
#define IM_TO_OS_TIME( _time ) (( (LONGLONG)_time ) * 10 )
#define OS_TO_IM_TIME( _time ) (( _time ) / 10 )
//
// convert from PS's microseconds to millisecs
//
#define IM_TIME_TO_MILLISECS( _time ) (( _time ) / 1000 )
#endif /* _OSDEP_ */
/* end osdep.h */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?