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

📄 rtmgr_ex.h

📁 一个Linux下的软猫驱动
💻 H
📖 第 1 页 / 共 2 页
字号:
Arguments: a handle to the instance to close.Return Value: COM_STATUS (COM_STATUS_SUCCESS if the block instance was 				successfully closed).Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrClose	(IN	HRTMGR hRtMgr);		/************ Specific Interface functions. ************/	/********************************************************************************Function Name:RegisterClient  Function Description: The function registers a client to the Runtime Manager identified					  by hRunTime. Arguments: hRunTime - a handle for the Runtime Manager instance.		   TimerResolution - OS timer resolution required for a new client.Return Value: a handle (identifier) for the new client. This handle should be used as			  a parameter for all client-related functions).Interrupt safe: no********************************************************************************/HRTCLIENT RTMgrRegisterClient	(	IN	HRTMGR		hRunTime,									IN	unsigned	TimerResolution);/********************************************************************************Function Name:SetClientTimerResolution  Function Description: Updates the timer resolution required by the 					  Client. Arguments:	hClient	- handle to the client		    TimerResolution - New client reqired timer resolutionReturn Value: COM_STAUTS_SUCCESS when client resolution is successfuly 				updated, else failure code.Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrSetClientTimerResolution	(	IN	HRTCLIENT	hClient,												IN	unsigned	TimerResolution);/********************************************************************************Function Name: UnregisterClient  Function Description: The function unregisters a client from the Runtime manager.Arguments: hClient - a handle for the specific Runtime client (which returns from		   the RegisterClient function).Return Value: COM_STATUS (COM_STATUS_SUCCESS if the client was successfully unregistered)Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrUnregisterClient	(IN	HRTCLIENT	hClient);/********************************************************************************Function Name: CreateAsyncCall  Function Description: Creates a non scheduled async call.Arguments: hClient - a handle for the specific RunTIme client (which returns from 		   the RegisterClient function).Return Value: a handle to the AsyncCall. (in case of error it returns NULL).Interrupt safe: no********************************************************************************/HASYNCCALL	RTMgrCreateAsyncCall	(IN	HRTMGR	hRtMgr);/********************************************************************************Function Name: SetAsyncCall  Function Description: This function is a request to the runtime manager to schedule 					  an async call as described in the structure pConfig poins to.					  Function specified in pConfig-pointed structure will be 					  called after time elapses. The timer can be be one-shot 					  or periodic.Arguments: hAsyncCall - a handle to the AsyncCall that was returned from the CreateAsyncCall		   pRefData - Reference data to be passed to the async callback function		   pConfig - a pointer to a structure containing the data about the request		   for the async call .Return Value: COM_STATUS_SUCCES on success, else error code.Interrupt safe: yes********************************************************************************/COM_STATUS	RTMgrSetAsyncCall	(	IN	HASYNCCALL			hAsyncCall,									IN	PASYNC_CALL_CONFIG	pConfig);/********************************************************************************Function Name: RestartAsyncCall  Function Description:	Sets an async call with configuration passed in						a previous SetAsyncCall of the specified hAsyncCall.						If the async call was not set previously the 						behaviour is not defined.Arguments: hAsyncCall - a handle to the AsyncCall that was returned from the CreateAsyncCall		   pRefData - Reference data to be passed to the async callback functionReturn Value: COM_STATUS_SUCCES on success, else error code.Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrRestartAsyncCall	(IN	HASYNCCALL	hAsyncCall);/********************************************************************************Function Name: CancelAsyncCall  Function Description: The function cancels the AsyncCall identified by the hAsyncCall					  handle from scheduler. The async call can be rescheduled through 					  SetAsyncCall function, or destroyed with DestroyAsyncCall function.Arguments: hAsyncCall - a handle to the AsyncCall that was returned from the CreateAsyncCall		   function.Return Value: COM_STATUS (COM_STATUS_SUCCESS if the AsyncCall was successfully canceled)Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrCancelAsyncCall	(IN	HASYNCCALL	hAsyncCall);/********************************************************************************Function Name: DestroyAsyncCall  Function Description: The function destroys the AsyncCall identified by the hAsyncCall					  handle.The async call handle becomes unusable.Arguments: hAsyncCall - a handle to the AsyncCall that was returned from the CreateAsyncCall		   function.Return Value: COM_STATUS (COM_STATUS_SUCCESS if the AsyncCall was successfully canceled)Interrupt safe: no********************************************************************************/COM_STATUS	RTMgrDestroyAsyncCall	(IN	HASYNCCALL	hAsyncCall);#ifdef MACTOPUS/********************************************************************************Function Name: CalledFromTimer  Function Description: The function check if current execution context is in RtMgr timer threadArguments: hRtMgr - RunTime manager handle Return Value: TRUE if execution context is in timer thread, otherwise - FALSE********************************************************************************/BOOL RTMgrCalledFromTimer	(IN	HRTMGR	hRtMgr);#endif#ifdef __cplusplus}#endiftypedef struct I_RT_MGR_TAG{		UINT32		(*GetInterfaceVersion)  (	void);	HRTMGR		(*Create)               (PSYSTEM_INSTANCES_T pSys);	COM_STATUS	(*Destroy)              (IN HRTMGR hBlock);	COM_STATUS	(*Open)                 (IN	HRTMGR hBlock);	COM_STATUS	(*Close)                (IN	HRTMGR hBlock);			HRTCLIENT	(*RegisterClient)       (IN	HRTMGR hRunTime,										 IN	unsigned	TimerResolution);	COM_STATUS	(*SetClientTimerResolution)(IN	HRTCLIENT	hClient, IN	unsigned TimerResolution);	COM_STATUS	(*UnregisterClient)     (IN	HRTCLIENT hClient);	HASYNCCALL	(*CreateAsyncCall)      (IN	HRTMGR	hRtMgr);	COM_STATUS	(*SetAsyncCall)         (IN	HASYNCCALL hAsyncCall, IN PASYNC_CALL_CONFIG pConfig);	COM_STATUS	(*RestartAsyncCall)     (IN	HASYNCCALL hAsyncCall);	COM_STATUS	(*CancelAsyncCall)      (IN	HASYNCCALL hAsyncCall);	COM_STATUS	(*DestroyAsyncCall)     (IN	HASYNCCALL hAsyncCall);} I_RT_MGR_T, *PI_RT_MGR_T;#ifdef USE_DIRECT_API	#define RTMGR_GetInterfaceVersion(      pSys)                           RTMgrGetInterfaceVersion        ()	#define RTMGR_Create(                   pSys)                           RTMgrCreate                     (pSys)	#define RTMGR_Destroy(                  pSys)                           RTMgrDestroy                    (pSys->hRtMgr)	#define RTMGR_Open(                     pSys)                           RTMgrOpen                       (pSys->hRtMgr)	#define RTMGR_Close(                    pSys)		                    RTMgrClose                      (pSys->hRtMgr)	#define RTMGR_RegisterClient(           pSys, TimerResolution)          RTMgrRegisterClient             (pSys->hRtMgr, TimerResolution)	#define RTMGR_SetClientTimerResolution( pSys, hClient, TimerResolution) RTMgrSetClientTimerResolution   (hClient, TimerResolution)	#define RTMGR_UnregisterClient(         pSys, hClient)                  RTMgrUnregisterClient           (hClient)	#define RTMGR_CreateAsyncCall(          pSys)                           RTMgrCreateAsyncCall            (pSys->hRtMgr)	#define RTMGR_SetAsyncCall(             pSys, hAsyncCall, pConfig)      RTMgrSetAsyncCall               (hAsyncCall, pConfig)	#define RTMGR_RestartAsyncCall(         pSys, hAsyncCall)               RTMgrRestartAsyncCall           (hAsyncCall)	#define RTMGR_CancelAsyncCall(          pSys, hAsyncCall)               RTMgrCancelAsyncCall            (hAsyncCall)	#define RTMGR_DestroyAsyncCall(         pSys, hAsyncCall)               RTMgrDestroyAsyncCall           (hAsyncCall)#else	#define RTMGR_GetInterfaceVersion(      pSys)                           pSys->pftRtMgr->GetInterfaceVersion        ()	#define RTMGR_Create(                   pSys)                           pSys->pftRtMgr->Create                     (pSys)	#define RTMGR_Destroy(                  pSys)                           pSys->pftRtMgr->Destroy                    (pSys->hRtMgr)	#define RTMGR_Open(                     pSys)                           pSys->pftRtMgr->Open                       (pSys->hRtMgr)	#define RTMGR_Close(                    pSys)		                    pSys->pftRtMgr->Close                      (pSys->hRtMgr)	#define RTMGR_RegisterClient(           pSys, TimerResolution)          pSys->pftRtMgr->RegisterClient             (pSys->hRtMgr, TimerResolution)	#define RTMGR_SetClientTimerResolution( pSys, hClient, TimerResolution) pSys->pftRtMgr->SetClientTimerResolution   (hClient, TimerResolution)	#define RTMGR_UnregisterClient(         pSys, hClient)                  pSys->pftRtMgr->UnregisterClient           (hClient)	#define RTMGR_CreateAsyncCall(          pSys)                           pSys->pftRtMgr->CreateAsyncCall            (pSys->hRtMgr)	#define RTMGR_SetAsyncCall(             pSys, hAsyncCall, pConfig)      pSys->pftRtMgr->SetAsyncCall               (hAsyncCall, pConfig)	#define RTMGR_RestartAsyncCall(         pSys, hAsyncCall)               pSys->pftRtMgr->RestartAsyncCall           (hAsyncCall)	#define RTMGR_CancelAsyncCall(          pSys, hAsyncCall)               pSys->pftRtMgr->CancelAsyncCall            (hAsyncCall)	#define RTMGR_DestroyAsyncCall(         pSys, hAsyncCall)               pSys->pftRtMgr->DestroyAsyncCall           (hAsyncCall)#endif#endif /* __RTMGR_H__ */

⌨️ 快捷键说明

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