diskevent.h

来自「一个用在mips体系结构中的操作系统」· C头文件 代码 · 共 71 行

H
71
字号
/* * 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 + =
减小字号Ctrl + -
显示快捷键?