⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 osdep.h

📁 ndis windows网络驱动程序的范例
💻 H
字号:
/*++

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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -