diff options
Diffstat (limited to 'src/pool.c')
-rw-r--r-- | src/pool.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,4 +1,4 @@ - +/* SPDX-License-Identifier: GPL-3.0-only */ #include <string.h> #include <stdlib.h> #include <pool.h> @@ -112,3 +112,12 @@ void *pool_iter_next_lock(pool *p) pool_unlock(p); return v; } + +bool pool_iter_check_next_lock(pool *p) +{ + bool next_exist; + pool_lock(p); + next_exist = (p->idx < p->num); + pool_unlock(p); + return next_exist; +} |