📄 diskevent.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. * *//* @TITLE "diskevent.h: manage a heap of future events"*//* * The disk-device module is event driven. This module keeps the event * request mechanism, which is based on proteus SimRequests, * abstracted away from the bulk of the disk device code. * * Functions * DDEventInit * DDEventRequest * DDEventPrint * DDEventCancel * * David Kotz 1994 *//* $Id: diskevent.h,v 1.4 1998/02/10 00:36:40 bosch Exp $ */#ifndef DISKEVENT_H#define DISKEVENT_H#include "time.h"typedef enum { NOP, DISKMOVE, STARTDISKXFER, ENDDISKXFER, CONSIDERBUSXFER, STARTBUSXFER, ENDBUSXFER, SENDCOMMAND, ENDCOMMAND, CONTROLLER, SENDSYNCCOMMAND, ENDSYNCCOMMAND, SENDBUFFERMESG, ENDBUFFERMESG, SENDDONEMESSAGE, ENDDONEMESSAGE} REQUESTCODE;typedef void DDEvent; /* internally, is a SimRequest */extern void DDEventInit(void);extern DDEvent * DDEventRequest(REQUESTCODE event, TICS eventTime, int disk);extern void DDEventPrint(FILE *fp, void *req); /* (, SimRequest *) */extern void DDEventCancel(DDEvent *ddev);extern void DDEventWakeup(int disk,int stid, TICS when); /* note STID not TID */ /* list of disk-device request types, * initialized in diskdevice.c, * used in diskevent.c */typedef void (*DDhandler)(int disk, TICS eventTime);struct dd_handlers { DDhandler handler; /* function implementing this event type */ char name[20]; /* name of that event type */};extern struct dd_handlers DDhandlers[];#endif /* DISKEVENT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -