| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 

Go to the source code of this file.
| Functions | |
| struct ast_serializer_pool * | ast_serializer_pool_create (const char *name, unsigned int size, struct ast_threadpool *threadpool, int timeout) | 
| Create a serializer pool. | |
| int | ast_serializer_pool_destroy (struct ast_serializer_pool *pool) | 
| Destroy the serializer pool. | |
| struct ast_taskprocessor * | ast_serializer_pool_get (struct ast_serializer_pool *pool) | 
| Retrieve a serializer from the pool. | |
| const char * | ast_serializer_pool_name (const struct ast_serializer_pool *pool) | 
| Retrieve the base name of the serializer pool. | |
| int | ast_serializer_pool_set_alerts (struct ast_serializer_pool *pool, long high, long low) | 
| Set taskprocessor alert levels for the serializers in the pool. | |
| struct ast_serializer_pool * | ast_serializer_taskpool_create (const char *name, unsigned int size, struct ast_taskpool *taskpool, int timeout) | 
| Create a serializer pool on taskpool. | |
| struct ast_serializer_pool * ast_serializer_pool_create | ( | const char * | name, | 
| unsigned int | size, | ||
| struct ast_threadpool * | threadpool, | ||
| int | timeout | ||
| ) | 
Create a serializer pool.
Create a serializer pool with an optional shutdown group. If a timeout greater than -1 is specified then a shutdown group is enabled on the pool.
| name | The base name for the pool, and used when building taskprocessor(s) | 
| size | The size of the pool | 
| threadpool | The backing threadpool to use | 
| timeout | The timeout used if using a shutdown group (-1 = disabled) | 
| NULL | on error | 
Definition at line 78 of file serializer.c.
References ast_assert, ast_log, ast_malloc, ast_serializer_pool_destroy(), ast_serializer_shutdown_group_alloc(), AST_TASKPROCESSOR_MAX_NAME, ast_taskprocessor_name_append(), ast_threadpool_serializer_group(), AST_VECTOR_APPEND, AST_VECTOR_RW_INIT, LOG_ERROR, name, NULL, ast_serializer_pool::shutdown_group, and ast_serializer_pool::shutdown_group_timeout.
Referenced by AST_TEST_DEFINE(), load_module(), and load_module().
| int ast_serializer_pool_destroy | ( | struct ast_serializer_pool * | pool | ) | 
Destroy the serializer pool.
Attempt to destroy the serializer pool. If a shutdown group has been enabled, and times out waiting for threads to complete, then this function will return the number of remaining threads, and the pool will not be destroyed.
| pool | The pool to destroy | 
Definition at line 41 of file serializer.c.
References ao2_ref, ast_debug, ast_free, ast_log, ast_serializer_shutdown_group_join(), ast_taskprocessor_unreference(), AST_VECTOR_RESET, AST_VECTOR_RW_FREE, AST_VECTOR_RW_UNLOCK, AST_VECTOR_RW_WRLOCK, LOG_WARNING, NULL, ast_serializer_pool::shutdown_group, and ast_serializer_pool::shutdown_group_timeout.
Referenced by ast_serializer_pool_create(), ast_serializer_taskpool_create(), AST_TEST_DEFINE(), load_module(), unload_module(), and unload_module().
| struct ast_taskprocessor * ast_serializer_pool_get | ( | struct ast_serializer_pool * | pool | ) | 
Retrieve a serializer from the pool.
| pool | The pool object | 
Definition at line 175 of file serializer.c.
References ast_taskprocessor_size(), AST_VECTOR_GET, AST_VECTOR_RW_RDLOCK, AST_VECTOR_RW_UNLOCK, AST_VECTOR_SIZE, and NULL.
Referenced by ast_sip_push_task(), ast_sip_push_task_wait_serializer(), AST_TEST_DEFINE(), load_module(), mwi_startup_event_cb(), mwi_stasis_cb(), send_contact_notify(), and send_notify().
| const char * ast_serializer_pool_name | ( | const struct ast_serializer_pool * | pool | ) | 
Retrieve the base name of the serializer pool.
| pool | The pool object | 
Definition at line 170 of file serializer.c.
Referenced by AST_TEST_DEFINE().
| int ast_serializer_pool_set_alerts | ( | struct ast_serializer_pool * | pool, | 
| long | high, | ||
| long | low | ||
| ) | 
Set taskprocessor alert levels for the serializers in the pool.
| pool | The pool to destroy | 
| high,low | 
| 0 | on success. | 
| -1 | on error. | 
Definition at line 204 of file serializer.c.
References ast_log, AST_LOG_WARNING, ast_taskprocessor_alert_set_levels(), AST_TASKPROCESSOR_HIGH_WATER_LEVEL, ast_taskprocessor_name(), AST_VECTOR_GET, AST_VECTOR_SIZE, ast_taskprocessor::tps_queue_high, and ast_taskprocessor::tps_queue_low.
Referenced by AST_TEST_DEFINE(), and global_loaded().
| struct ast_serializer_pool * ast_serializer_taskpool_create | ( | const char * | name, | 
| unsigned int | size, | ||
| struct ast_taskpool * | taskpool, | ||
| int | timeout | ||
| ) | 
Create a serializer pool on taskpool.
Create a serializer pool with an optional shutdown group. If a timeout greater than -1 is specified then a shutdown group is enabled on the pool.
| name | The base name for the pool, and used when building taskprocessor(s) | 
| size | The size of the pool | 
| taskpool | The backing taskpool to use | 
| timeout | The timeout used if using a shutdown group (-1 = disabled) | 
| NULL | on error | 
Definition at line 124 of file serializer.c.
References ast_assert, ast_log, ast_malloc, ast_serializer_pool_destroy(), ast_serializer_shutdown_group_alloc(), ast_taskpool_serializer_group(), AST_TASKPROCESSOR_MAX_NAME, ast_taskprocessor_name_append(), AST_VECTOR_APPEND, AST_VECTOR_RW_INIT, LOG_ERROR, name, NULL, ast_serializer_pool::shutdown_group, ast_serializer_pool::shutdown_group_timeout, and taskpool.