#include <riofreelist.h>
Public Member Functions | |
CRioFreeList () | |
~CRioFreeList () | |
void | Free (RioQueueEle *ep) |
RioQueueEle * | Get () |
RioQueueEle * | GetNB () |
Private Attributes | |
CvsiCondition | m_cond |
int | m_waitflag |
RioQueueEle * | m_first |
Definition at line 31 of file riofreelist.h.
CRioFreeList::CRioFreeList | ( | ) |
Definition at line 34 of file riofreelist.cpp.
00035 { 00036 m_waitflag = 0; 00037 m_first = NULL; 00038 }
CRioFreeList::~CRioFreeList | ( | ) |
Definition at line 41 of file riofreelist.cpp.
void CRioFreeList::Free | ( | RioQueueEle * | ep | ) |
Definition at line 47 of file riofreelist.cpp.
RioQueueEle * CRioFreeList::Get | ( | void | ) |
Definition at line 63 of file riofreelist.cpp.
00064 { 00065 RioQueueEle *ep; 00066 00067 m_cond.Lock(); 00068 while(m_first == 0) 00069 { 00070 m_waitflag = 1; 00071 m_cond.Wait(); 00072 } 00073 00074 ep = m_first; 00075 m_first = ep->linkf; 00076 00077 m_waitflag = 0; 00078 00079 m_cond.Unlock(); 00080 00081 return ep; 00082 00083 }
RioQueueEle * CRioFreeList::GetNB | ( | ) |
CvsiCondition CRioFreeList::m_cond [private] |
Definition at line 43 of file riofreelist.h.
RioQueueEle* CRioFreeList::m_first [private] |
Definition at line 45 of file riofreelist.h.
int CRioFreeList::m_waitflag [private] |
Definition at line 44 of file riofreelist.h.