diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad1c90e..8b9b9420 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ Changelog --------- +v3.1.1 +------ +- Bug fix for the pool objects on the recycling functionality. + v3.1.0 ------ - A new high-performant, optimized implementation for the flat-combining synchronization technique. This new implementation provided by the Synch framework is written from the scratch. diff --git a/benchmarks/clhstackbench.c b/benchmarks/clhstackbench.c index f64eef01..8d114228 100644 --- a/benchmarks/clhstackbench.c +++ b/benchmarks/clhstackbench.c @@ -58,7 +58,7 @@ inline static Object pop(int pid) { #endif synchNonTSOFence(); CLHUnlock(lock, pid); - synchRecycleObj(&pool_node, n); + if (n != NULL) synchRecycleObj(&pool_node, n); return result; } diff --git a/libconcurrent/primitives/pool.c b/libconcurrent/primitives/pool.c index 7772b8ce..a4b4a1b0 100644 --- a/libconcurrent/primitives/pool.c +++ b/libconcurrent/primitives/pool.c @@ -76,6 +76,9 @@ void *synchAllocObj(SynchPoolStruct *pool) { void synchRecycleObj(SynchPoolStruct *pool, void *obj) { #ifndef SYNCH_POOL_NODE_RECYCLING_DISABLE + if (obj == NULL) + return; + SynchBlockObject *object = obj; object->next = pool->recycle_list; pool->recycle_list = object; diff --git a/resources/Doxyfile b/resources/Doxyfile index a4e2c485..e5ed27c1 100644 --- a/resources/Doxyfile +++ b/resources/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = "The Synch framework" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = v3.1.0 +PROJECT_NUMBER = v3.1.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a