FreeRDP
StreamPool.c File Reference
#include <winpr/crt.h>
#include <winpr/wlog.h>
#include <winpr/collections.h>

Functions

static INLINE void StreamPool_Lock (wStreamPool *pool)
 
static INLINE void StreamPool_Unlock (wStreamPool *pool)
 
static BOOL StreamPool_EnsureCapacity (wStreamPool *pool, size_t count, BOOL usedOrAvailable)
 
static void StreamPool_ShiftUsed (wStreamPool *pool, size_t index, INT64 count)
 
static void StreamPool_AddUsed (wStreamPool *pool, wStream *s)
 
static void StreamPool_RemoveUsed (wStreamPool *pool, wStream *s)
 
static void StreamPool_ShiftAvailable (wStreamPool *pool, size_t index, INT64 count)
 
wStream * StreamPool_Take (wStreamPool *pool, size_t size)
 
void StreamPool_Return (wStreamPool *pool, wStream *s)
 
void Stream_AddRef (wStream *s)
 
void Stream_Release (wStream *s)
 
wStream * StreamPool_Find (wStreamPool *pool, BYTE *ptr)
 
void StreamPool_Clear (wStreamPool *pool)
 
wStreamPool * StreamPool_New (BOOL synchronized, size_t defaultSize)
 
void StreamPool_Free (wStreamPool *pool)
 
char * StreamPool_GetStatistics (wStreamPool *pool, char *buffer, size_t size)
 

Function Documentation

◆ Stream_AddRef()

void Stream_AddRef ( wStream *  s)

Increment stream reference count

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Stream_Release()

void Stream_Release ( wStream *  s)

Decrement stream reference count

Here is the call graph for this function:

◆ StreamPool_AddUsed()

static void StreamPool_AddUsed ( wStreamPool *  pool,
wStream *  s 
)
static

Adds a used stream to the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_Clear()

void StreamPool_Clear ( wStreamPool *  pool)

Releases the streams currently cached in the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_EnsureCapacity()

static BOOL StreamPool_EnsureCapacity ( wStreamPool *  pool,
size_t  count,
BOOL  usedOrAvailable 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_Find()

wStream* StreamPool_Find ( wStreamPool *  pool,
BYTE ptr 
)

Find stream in pool using pointer inside buffer

Here is the call graph for this function:

◆ StreamPool_Free()

void StreamPool_Free ( wStreamPool *  pool)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_GetStatistics()

char* StreamPool_GetStatistics ( wStreamPool *  pool,
char *  buffer,
size_t  size 
)
Here is the caller graph for this function:

◆ StreamPool_Lock()

static INLINE void StreamPool_Lock ( wStreamPool *  pool)
static

Lock the stream pool

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_New()

wStreamPool* StreamPool_New ( BOOL  synchronized,
size_t  defaultSize 
)

Construction, Destruction

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_RemoveUsed()

static void StreamPool_RemoveUsed ( wStreamPool *  pool,
wStream *  s 
)
static

Removes a used stream from the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_Return()

void StreamPool_Return ( wStreamPool *  pool,
wStream *  s 
)

Returns an object to the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_ShiftAvailable()

static void StreamPool_ShiftAvailable ( wStreamPool *  pool,
size_t  index,
INT64  count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_ShiftUsed()

static void StreamPool_ShiftUsed ( wStreamPool *  pool,
size_t  index,
INT64  count 
)
static

Methods

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_Take()

wStream* StreamPool_Take ( wStreamPool *  pool,
size_t  size 
)

Gets a stream from the pool.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ StreamPool_Unlock()

static INLINE void StreamPool_Unlock ( wStreamPool *  pool)
static

Unlock the stream pool

Here is the call graph for this function:
Here is the caller graph for this function: