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

📄 eventcallback.h

📁 一个用在mips体系结构中的操作系统
💻 H
字号:
/* * Copyright (C) 1996-1998 by the Board of Trustees *    of Leland Stanford Junior University. *  * This file is part of the SimOS distribution.  * See LICENSE file for terms of the license.  * *//***************************************************************** * eventcallback.h * * Interface timed eventcall routine for simos..  * * $Author: bosch $ * $Date: 1998/02/10 00:28:22 $ ****************************************************************/#ifndef EVENTCALLBACK_H#define EVENTCALLBACK_H#include "simtypes.h"typedef struct EventCallbackHdr {   struct    EventCallbackHdr *next;   int cpuNum;   bool active;   SimTime when;   void (*rout) (int, struct EventCallbackHdr *,void*);   void *arg;} EventCallbackHdr;typedef struct EventQueue {   SimTime calltime;   SimTime lastCall;   int lock;   EventCallbackHdr sentinel;   char padding2[128-sizeof(int)-2*sizeof(SimTime)-sizeof(EventCallbackHdr)];} EventQueue;#ifdef notdeftypedef (*EventCallback) (int, struct EventCallbackHdr *,void*);#endifextern void EventCallbackInit(int cpuNum);extern void EventDoCallback(int cpuNum,void (*rout)(int,EventCallbackHdr *,void*),                             EventCallbackHdr *, void *arg, SimTime timeInFuture);extern void EventCallbackRemove(EventCallbackHdr * event);extern void EventCallbackUpdate(EventCallbackHdr * event, SimTime  when);extern void EventProcess(int cpuNum,SimTime now);extern EventQueue *eventQueues;#define SingleEventQueueCalltimeAddr (&eventQueues->calltime)#define EventPendingSingleQueue(_tim) (eventQueues->calltime <= (_tim))#define EventProcessSingleQueue(_tim) EventProcess(-1,(_tim))#define EventPollSingleQueue(_tim) \     if (eventQueues->calltime <= (_tim)) EventProcess(-1,_tim);#define EventPollMultipleQueue(_cpu,_tim) \     if (eventQueues[_cpu].calltime <= (_tim)) EventProcess(_cpu,_tim);#define EventCallbackActive(_ev) ((_ev)->active)#endif /* EVENTCALLBACK_H */

⌨️ 快捷键说明

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