Skip to content

Commit

Permalink
20160409
Browse files Browse the repository at this point in the history
  • Loading branch information
liangdc committed Apr 9, 2016
1 parent 6c78a87 commit 1106c9c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Common/Src/bufferpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,26 +550,26 @@ struct TBuffer
TItemList items;
};

typedef CRingPool<TBuffer> TBufferList;
typedef CCASQueue<TBuffer> TBufferQueue;

typedef unordered_map<ULONG_PTR, TBuffer*> TBufferPtrMap;
typedef TBufferPtrMap::iterator TBufferPtrMapI;
typedef TBufferPtrMap::const_iterator TBufferPtrMapCI;

class CBufferPool
{
typedef CRingPool<TBuffer> TBufferList;
typedef CCASQueue<TBuffer> TBufferQueue;

typedef unordered_map<ULONG_PTR, TBuffer*> TBufferPtrMap;
typedef TBufferPtrMap::iterator TBufferPtrMapI;
typedef TBufferPtrMap::const_iterator TBufferPtrMapCI;

public:
void PutFreeBuffer (ULONG_PTR dwID);
TBuffer* PutCacheBuffer (ULONG_PTR dwID);
TBuffer* PickFreeBuffer (ULONG_PTR dwID);
TBuffer* FindCacheBuffer (ULONG_PTR dwID);
TBuffer* PickFreeBuffer (ULONG_PTR dwID);
void PutFreeBuffer (TBuffer* pBuffer);

void Prepare ();
void Clear ();

private:
void PutFreeBuffer (TBuffer* pBuffer);
void ReleaseGCBuffer (BOOL bForce = FALSE);

public:
Expand Down

0 comments on commit 1106c9c

Please sign in to comment.