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

📄 pppd.h

📁 windows系统下实时代码,可以进行底层硬件的实时操作
💻 H
字号:
/*++
 *
 * Copyright (c) 1998-2005, Ardence, Inc.  All rights reserved.
 *
 * Module Name:
 *
 *      Pppd.h
 *
 * Abstract:
 *
 *      This header provides simple macros for Per-Process Private Data (PPPD)
 *		inside a RTDLL.
 *
 * Author:
 *
 *      Lev Zaltsman   3/1/2000
 *
 * Environment:
 *
 *      RTX application (RTSS only). 
 *
 * Revision History:
 *
 *     Initial revision (LDZ)
--*/

//
// Maximum number of RTSS processes (default limit is 10 on RTSS).  Increase if
// your system has additional RTSS process slots.
//
#ifndef	MAX_PROCESSES
#  define	MAX_PROCESSES 10
#endif

//
// Macros to scope private data in the RTDLL (do only once).
//
#define	PPPD_DATA_BEGIN		typedef struct _PppdData {

#define	PPPD_DATA_END		} _PPPD_DATA, *_PPPPD_DATA;

#define	PPPD_ALLOCATE	_PPPD_DATA _PppdBuffer[MAX_PROCESSES];

#define	PPPD_EXTERN extern _PPPD_DATA _PppdBuffer[MAX_PROCESSES];

//
// Macros to use in a RTDLL function to access private data.  PPPD_FUNC_ENTRY
// must be used in the beginning of any function that will use private data.
//
// NOTE: As an optimization, the pointer can be passed as a formal parameter
//       lower level functions.
//
#define	PPPD_PTR			_PPPPD_DATA	_PppdPtr

#define PPPD_FUNC_ENTRY		PPPD_PTR;								\
	  {if ((_PppdPtr = &_PppdBuffer[GetCurrentProcessId()]) >=		\
                      &_PppdBuffer[MAX_PROCESSES])					\
		RtPrintf ("\nPPPD ERROR: Current Process Id is >= MAX_PROCESSES\n");}

#define PPPD(x)				(_PppdPtr->x)


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -