📄 queue.h
字号:
#ifndef _QUEUE_H
#define _QUEUE_H
#include "devicelog.h"
typedef struct QNode
{
struct eventinfo data;
struct QNode *next;
}QNode,*Queueptr;
typedef struct
{
Queueptr front;
Queueptr rear;
}LinkQueue;
void InitQueue(LinkQueue *Q);/*initialize the queue*/
void DestroyQueue(LinkQueue *Q);/*destroy the queue*/
void CleanQueue(LinkQueue *Q);/*clean the queue*/
int QueueEmpty(LinkQueue *Q);/*judge the queue is empty*/
int QueueLength(LinkQueue *Q);/*get the length of the queue*/
void GetHear(LinkQueue *Q,struct eventinfo *e);/*get the head data*/
void Enqueue(LinkQueue *Q,struct eventinfo e);/*insert the e into queue*/
void Dequeue(LinkQueue *Q,struct eventinfo *e);/*delete the head data and store it in e*/
void PrintQueue(LinkQueue *Q); /*print the queue*/
#endif /*queue.h*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -