Lines Matching defs:pool
59 * @brief IO pool.
61 * Structure encapsulating a pool of IO objects.
67 ocs_lock_t lock; /* IO pool lock */
69 ocs_pool_t *pool;
73 * @brief Create a pool of IO objects.
109 /* Allocate the IO pool */
112 ocs_log_err(ocs, "allocate of IO pool failed\n");
119 /* initialize IO pool lock */
122 io_pool->pool = ocs_pool_alloc(ocs, sizeof(ocs_io_t), io_pool->io_num_ios, FALSE);
125 ocs_io_t *io = ocs_pool_get_instance(io_pool->pool, i);
182 * @brief Free IO objects pool
185 * The pool of IO objects are freed.
187 * @param io_pool Pointer to IO pool object.
201 io = ocs_pool_get_instance(io_pool->pool, i);
215 if (io_pool->pool != NULL) {
216 ocs_pool_free(io_pool->pool);
235 * @param io_pool Pointer to the IO pool.
250 if ((io = ocs_pool_get(io_pool->pool)) != NULL) {
280 * @param io_pool Pointer to IO pool object.
296 ocs_pool_put(io_pool->pool, io);
348 return ocs_pool_get_instance(io_pool->pool, index);