[winpr,queue] improve queue management

* Fix Queue_EnsureCapacity reallocation handling, ensure queue->tail is
  properly updated.
* Fix allocation behaviour, use growthFactor * 32 as block size.
* Add doxygen for Queue_New
This commit is contained in:
Armin Novak
2026-02-18 09:27:56 +01:00
parent c0d477d278
commit b78cb455cb
2 changed files with 72 additions and 36 deletions

View File

@@ -181,6 +181,14 @@ extern "C"
WINPR_API void Queue_Free(wQueue* queue);
/** @brief Creates a new queue
*
* @param synchronized If \b TRUE all functions are thread safe, if \b FALSE no synchronization
* is done.
* @param capacity The initial capacity of the queue. If \b 0 or \b -1 default settings are
* applied.
* @param growthFactor allocation behaviour when the queue capacity should be increased. Larger
* values increase the allocation contingent. \b 0 or \b -1 apply default settings.
*
*
* @return A newly allocated queue or \b NULL in case of failure
*/