loop_queue.h

来自「操作系统课程设计」· C头文件 代码 · 共 23 行

H
23
字号
#ifndef _LOOP_QUEUE_H_
#define _LOOP_QUEUE_H_

#include "typedefine.h"
#include "constant.h"

typedef ElemType QUEUE_ELEMENT_TYPE;

typedef struct LOOP_QUEUE{
	QUEUE_ELEMENT_TYPE data[MAX_QUEUE_SIZE];
	SIZE_T front;		/* head pointer of the queue */
	SIZE_T rear;		/* tail pointer of the queue */
}LOOP_QUEUE, * PLOOP_QUEUE;

PLOOP_QUEUE CreateLQueue();
BOOL DestroyLQueue(PLOOP_QUEUE *);
BOOL EnLQueue(PLOOP_QUEUE, QUEUE_ELEMENT_TYPE);
BOOL DeLQueue(PLOOP_QUEUE, QUEUE_ELEMENT_TYPE *);
BOOL LQueueEmpty(PLOOP_QUEUE);
BOOL LQueueFull(PLOOP_QUEUE);
SIZE_T LQueueLength(PLOOP_QUEUE);

#endif

⌨️ 快捷键说明

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