#include <stdio.h>#include <stdlib.h>#include <string.h>#include <errno.h>#include <pthread.h>#include <fuse/fuse.h>#include "query.h"#include "pool.h"#include "log.h"Include dependency graph for pool.c:

Go to the source code of this file.
Data Structures | |
| struct | pool_lifo |
| Used in lifo_put() and lifo_get() to maintain a LIFO list. More... | |
Functions | |
| int | pool_init (struct mysqlfs_opt *opt_arg) |
| Initalize pool and preallocate connections. | |
| void | pool_cleanup () |
| Close all connections and cleanup pool. | |
| void * | pool_get () |
| Get DB connection from pool. | |
| void | pool_put (void *conn) |
| Put DB connection back to the pool. | |
Variables | |
| mysqlfs_opt * | opt |
| pool_lifo * | lifo_pool = NULL |
| pool_lifo * | lifo_unused = NULL |
| unsigned int | lifo_unused_cnt = 0 |
| unsigned int | lifo_pool_cnt = 0 |
| void pool_cleanup | ( | ) |
Close all connections and cleanup pool.
Definition at line 200 of file pool.c.
References LOG_D_POOL, and log_printf().
Referenced by main().
Here is the call graph for this function:

| void* pool_get | ( | ) |
Get DB connection from pool.
Definition at line 210 of file pool.c.
References LOG_D_POOL, and log_printf().
Referenced by pool_init().
Here is the call graph for this function:

| int pool_init | ( | struct mysqlfs_opt * | opt_arg | ) |
Initalize pool and preallocate connections.
Definition at line 172 of file pool.c.
References mysqlfs_opt::init_conns, LOG_D_POOL, log_printf(), opt, pool_get(), and pool_put().
Referenced by main().
Here is the call graph for this function:

| void pool_put | ( | void * | conn | ) |
Put DB connection back to the pool.
Definition at line 222 of file pool.c.
References lifo_pool_cnt, LOG_D_POOL, log_printf(), mysqlfs_opt::max_idling_conns, and opt.
Referenced by pool_init().
Here is the call graph for this function:

| unsigned int lifo_pool_cnt = 0 |
| struct pool_lifo* lifo_unused = NULL |
| unsigned int lifo_unused_cnt = 0 |
| struct mysqlfs_opt* opt |
1.4.7