public QueueNode CreateQueue(int frameSize) { QueueNode Q=new QueueNode(); Q.FrameSize=frameSize; Q.Count=0; Q.Rear=Q.Front=null; return Q; }
public void DeQueue(ref QueueNode Q) { if (isQueueEmpty(Q)) return; if( Q.Front==Q.Rear) Q.Front = null; QueueNode temp = Q.Rear; Q.Rear = Q.Rear.Prev; if (Q.Rear == null) Q.Rear.Next = null; temp = null; Q.Count--; }
public bool isQueueFull(QueueNode Q) { return Q.Count == Q.FrameSize; }
public bool isQueueEmpty(QueueNode Q) { return Q.Count == 0; }