| | |
| | | theQueue->Caps=nSize; |
| | | theQueue->wp=0; |
| | | theQueue->rp=0; |
| | | theQueue->RecvBytes=0; |
| | | // theQueue->RecvBytes=0; |
| | | //theQueue->state=0; |
| | | theQueue->bFull=0; |
| | | theQueue->bEmpty=1; |
| | | theQueue->state=0; |
| | | return 0; |
| | | } |
| | | int EmptyQueue(stMyQueue * theQueue) |
| | | { |
| | | theQueue->wp=0; |
| | | theQueue->rp=0; |
| | | //theQueue->state=0; |
| | | theQueue->bFull=0; |
| | | theQueue->bEmpty=1; |
| | | theQueue->state=0; |
| | | return 0; |
| | | } |
| | | int GetContinueEmptyRoom(stMyQueue * theQueue) |
| | |
| | | theQueue->bEmpty=0; |
| | | if (wp == theQueue->rp) theQueue->bFull=1; |
| | | theQueue->wp = wp; |
| | | theQueue->RecvBytes+=nSize; |
| | | // theQueue->RecvBytes+=nSize; |
| | | return nSize; |
| | | } |
| | | |
| | |
| | | theQueue->rp = rp; |
| | | if (rp == theQueue->wp) |
| | | { |
| | | theQueue->bEmpty=1; |
| | | theQueue->wp=0; |
| | | theQueue->rp=0; |
| | | theQueue->state=0; |
| | | // theQueue->state=0; |
| | | theQueue->bEmpty=1; |
| | | } |
| | | return nSize; |
| | | } |