196 } values;
void fiftyoneDegreesPoolFree(fiftyoneDegreesPool *pool)
Releases the items used by the pool freeing the resources used by each item by calling the resourceFr...
fiftyoneDegreesPoolItem * fiftyoneDegreesPoolItemGet(fiftyoneDegreesPool *pool, fiftyoneDegreesException *exception)
Gets the next free item from the pool for exclusive use by the caller.
void fiftyoneDegreesPoolItemRelease(fiftyoneDegreesPoolItem *item)
Releases the item back to the pool it belongs ready to be reused by another operation.
void(* fiftyoneDegreesPoolResourceFree)(fiftyoneDegreesPool *pool, void *resource)
Frees a resource previously created with fiftyoneDegreesPoolResourceCreate.
Definition pool.h:175
size_t(* fiftyoneDegreesPoolResourceSize)(void *state)
Used to determine the additional size beyond the pointer used for each resource added to the pool.
Definition pool.h:168
void *(* fiftyoneDegreesPoolResourceCreate)(fiftyoneDegreesPool *pool, void *state, fiftyoneDegreesException *exception)
Used to create a new resource for use in the pool.
Definition pool.h:156
void fiftyoneDegreesPoolReset(fiftyoneDegreesPool *pool)
Resets the pool without releasing any resources.
fiftyoneDegreesPool * fiftyoneDegreesPoolInit(fiftyoneDegreesPool *pool, uint16_t concurrency, void *state, fiftyoneDegreesPoolResourceCreate resourceCreate, fiftyoneDegreesPoolResourceFree resourceFree, fiftyoneDegreesException *exception)
Initialises a pool data structure to support the number of concurrent requests that can be made to th...
Structure used to represent a 51Degrees exception and passed into methods that might generate excepti...
Definition exceptions.h:115
fiftyoneDegreesPoolItem * stack
Pointer to the memory used by the stack.
Definition pool.h:203
fiftyoneDegreesPoolResourceFree resourceFree
Frees a resource.
Definition pool.h:207
uint16_t count
Number of resource items that stack can hold.
Definition pool.h:206
void * resource
Pointer to the resource in the pool.
Definition pool.h:183
fiftyoneDegreesPool * pool
Reader the handle belongs to.
Definition pool.h:185
volatile long exchange
Number used in the compare exchange operation.
Definition pool.h:192
uint16_t aba
ABA value used to ensure proper operation.
Definition pool.h:195
uint16_t index
Index of the item in the linked list.
Definition pool.h:194
