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

📄 queue.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.  * *//* @TITLE "queue.h: queue data structure"*//*  * queue: this is a normal FIFO queue module, with a fixed maximum capacity. * * David Kotz 1994 *//* $Id: queue.h,v 1.4 1998/02/10 00:36:49 bosch Exp $ */#ifndef QUEUE_H#define QUEUE_Htypedef void *Qitem;          /* a queue item is any pointer *//* ******************************************************* *//* CYCLE-COUNTED versions (only usable in USER mode) */typedef struct queue_s QUEUE; /* Queue handle */extern QUEUE *MakeQueue(int size, char *debugname); /* make a new queue */extern void Enqueue(QUEUE *q, Qitem item);extern void Dequeue(QUEUE *q, Qitem *item);extern int InQueue(QUEUE *q); /* number currently in queue */extern boolean EmptyQueue(QUEUE *q); /* TRUE if queue is empty */extern void FreeQueue(QUEUE *q); /* destroy a queue *//* ******************************************************* *//* NON-CYCLE-COUNTED versions (also useful in ENGINE mode) */typedef struct queue_noncyc_s NCQUEUE; /* Queue handle */extern NCQUEUE *MakeQueue_noncyc(int size, char *debugname); /* new queue */extern void Enqueue_noncyc(NCQUEUE *q, Qitem item);extern void Dequeue_noncyc(NCQUEUE *q, Qitem *item);extern int InQueue_noncyc(NCQUEUE *q); /* number currently in queue */extern boolean EmptyQueue_noncyc(NCQUEUE *q); /* TRUE if queue is empty */extern void FreeQueue_noncyc(NCQUEUE *q); /* destroy a queue */#endif /* QUEUE_H */

⌨️ 快捷键说明

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