Asterisk - The Open Source Telephony Project GIT-master-b023714
|
threadpool unit tests More...
#include "asterisk.h"
#include "asterisk/astobj2.h"
#include "asterisk/lock.h"
#include "asterisk/logger.h"
#include "asterisk/module.h"
#include "asterisk/taskprocessor.h"
#include "asterisk/test.h"
#include "asterisk/threadpool.h"
Go to the source code of this file.
Data Structures | |
struct | complex_task_data |
struct | efficiency_task_data |
struct | serializer_efficiency_task_data |
struct | simple_task_data |
struct | test_listener_data |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (threadpool_auto_increment) | |
AST_TEST_DEFINE (threadpool_initial_threads) | |
AST_TEST_DEFINE (threadpool_max_size) | |
AST_TEST_DEFINE (threadpool_more_destruction) | |
AST_TEST_DEFINE (threadpool_one_task_one_thread) | |
AST_TEST_DEFINE (threadpool_one_thread_multiple_tasks) | |
AST_TEST_DEFINE (threadpool_one_thread_one_task) | |
AST_TEST_DEFINE (threadpool_push) | |
AST_TEST_DEFINE (threadpool_reactivation) | |
AST_TEST_DEFINE (threadpool_serializer) | |
AST_TEST_DEFINE (threadpool_serializer_dupe) | |
AST_TEST_DEFINE (threadpool_task_distribution) | |
AST_TEST_DEFINE (threadpool_thread_creation) | |
AST_TEST_DEFINE (threadpool_thread_destruction) | |
AST_TEST_DEFINE (threadpool_thread_timeout) | |
AST_TEST_DEFINE (threadpool_thread_timeout_thrash) | |
static int | complex_task (void *data) |
static struct complex_task_data * | complex_task_data_alloc (void) |
static void | complex_task_data_free (struct complex_task_data *ctd) |
static int | efficiency_task (void *data) |
static char * | handle_cli_threadpool_push_efficiency (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static char * | handle_cli_threadpool_push_serializer_efficiency (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | has_complex_started (struct complex_task_data *ctd) |
static enum ast_test_result_state | listener_check (struct ast_test *test, struct ast_threadpool_listener *listener, int task_pushed, int was_empty, int num_tasks, int num_active, int num_idle, int empty_notice) |
static int | load_module (void) |
static void | poke_worker (struct complex_task_data *ctd) |
static int | serializer_efficiency_task (void *data) |
static int | simple_task (void *data) |
static struct simple_task_data * | simple_task_data_alloc (void) |
static void | simple_task_data_free (struct simple_task_data *std) |
static struct test_listener_data * | test_alloc (void) |
static void | test_emptied (struct ast_threadpool *pool, struct ast_threadpool_listener *listener) |
static void | test_shutdown (struct ast_threadpool_listener *listener) |
static void | test_state_changed (struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int active_threads, int idle_threads) |
static void | test_task_pushed (struct ast_threadpool *pool, struct ast_threadpool_listener *listener, int was_empty) |
static int | unload_module (void) |
static enum ast_test_result_state | wait_for_completion (struct ast_test *test, struct simple_task_data *std) |
static enum ast_test_result_state | wait_for_complex_completion (struct complex_task_data *ctd) |
static int | wait_for_complex_start (struct complex_task_data *ctd) |
static enum ast_test_result_state | wait_for_empty_notice (struct ast_test *test, struct test_listener_data *tld) |
static void | wait_for_task_pushed (struct ast_threadpool_listener *listener) |
static enum ast_test_result_state | wait_until_thread_state (struct ast_test *test, struct test_listener_data *tld, int num_active, int num_idle) |
static enum ast_test_result_state | wait_until_thread_state_task_pushed (struct ast_test *test, struct test_listener_data *tld, int num_active, int num_idle, int num_tasks) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "threadpool test module" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli [] |
static const struct ast_threadpool_listener_callbacks | test_callbacks |
threadpool unit tests
Definition in file test_threadpool.c.
|
static |
Definition at line 2100 of file test_threadpool.c.
|
static |
Definition at line 2100 of file test_threadpool.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 2100 of file test_threadpool.c.
AST_TEST_DEFINE | ( | threadpool_auto_increment | ) |
Definition at line 1098 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_shutdown(), end, listener(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), wait_for_empty_notice(), wait_until_thread_state(), and wait_until_thread_state_task_pushed().
AST_TEST_DEFINE | ( | threadpool_initial_threads | ) |
Definition at line 459 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_shutdown(), end, listener(), NULL, options, test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_max_size | ) |
Definition at line 1226 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_more_destruction | ) |
Definition at line 1623 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), complex_task(), complex_task_data_alloc(), complex_task_data_free(), end, listener(), listener_check(), NULL, options, poke_worker(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_complex_completion(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_one_task_one_thread | ) |
Definition at line 788 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), wait_for_empty_notice(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_one_thread_multiple_tasks | ) |
Definition at line 957 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), wait_for_empty_notice(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_one_thread_one_task | ) |
Definition at line 872 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), wait_for_empty_notice(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_push | ) |
Definition at line 290 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, and wait_for_task_pushed().
AST_TEST_DEFINE | ( | threadpool_reactivation | ) |
Definition at line 1298 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), wait_for_empty_notice(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_serializer | ) |
Definition at line 1739 of file test_threadpool.c.
References ast_taskprocessor_push(), ast_taskprocessor_unreference(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_threadpool_create(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_serializer(), ast_threadpool_shutdown(), complex_task(), complex_task_data_alloc(), complex_task_data_free(), end, has_complex_started(), NULL, options, poke_worker(), TEST_EXECUTE, TEST_INIT, wait_for_complex_completion(), and wait_for_complex_start().
AST_TEST_DEFINE | ( | threadpool_serializer_dupe | ) |
Definition at line 1997 of file test_threadpool.c.
References ast_taskprocessor_unreference(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, ast_threadpool_create(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_serializer(), ast_threadpool_shutdown(), end, NULL, options, TEST_EXECUTE, and TEST_INIT.
AST_TEST_DEFINE | ( | threadpool_task_distribution | ) |
Definition at line 1524 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), complex_task(), complex_task_data_alloc(), complex_task_data_free(), end, listener(), listener_check(), NULL, options, poke_worker(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_complex_completion(), and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_thread_creation | ) |
Definition at line 511 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), NULL, options, test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_thread_destruction | ) |
Definition at line 566 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_thread_timeout | ) |
Definition at line 630 of file test_threadpool.c.
References ao2_cleanup, ast_free, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_set_size(), ast_threadpool_shutdown(), end, listener(), listener_check(), NULL, options, test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, and wait_until_thread_state().
AST_TEST_DEFINE | ( | threadpool_thread_timeout_thrash | ) |
Definition at line 697 of file test_threadpool.c.
References ao2_cleanup, ast_cond_timedwait, ast_free, ast_mutex_lock, ast_mutex_unlock, AST_TEST_FAIL, AST_TEST_NOT_RUN, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_set_size(), ast_threadpool_shutdown(), ast_tvnow(), test_listener_data::cond, end, listener(), listener_check(), test_listener_data::lock, NULL, options, simple_task(), simple_task_data_alloc(), simple_task_data_free(), test_alloc(), test_callbacks, TEST_EXECUTE, TEST_INIT, wait_for_completion(), and wait_until_thread_state().
|
static |
Definition at line 1443 of file test_threadpool.c.
References ast_cond_signal, ast_cond_wait, complex_task_data::continue_task, lock, complex_task_data::lock, complex_task_data::notify_cond, SCOPED_MUTEX, complex_task_data::stall_cond, complex_task_data::task_executed, and complex_task_data::task_started.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 1417 of file test_threadpool.c.
References ast_calloc, ast_cond_init, ast_mutex_init, complex_task_data::lock, complex_task_data::notify_cond, NULL, and complex_task_data::stall_cond.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 1430 of file test_threadpool.c.
References ast_cond_destroy, ast_free, ast_mutex_destroy, complex_task_data::lock, complex_task_data::notify_cond, and complex_task_data::stall_cond.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 358 of file test_threadpool.c.
References ast_atomic_fetchadd_int(), ast_threadpool_push(), efficiency_task(), efficiency_task_data::num_tasks_executed, efficiency_task_data::pool, and efficiency_task_data::shutdown.
Referenced by efficiency_task(), and handle_cli_threadpool_push_efficiency().
|
static |
Definition at line 375 of file test_threadpool.c.
References a, ao2_cleanup, ast_cli(), ast_cond_timedwait, ast_free, ast_mutex_lock, ast_mutex_unlock, AST_TEST_FAIL, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_push(), ast_threadpool_shutdown(), ast_tvnow(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, test_listener_data::cond, efficiency_task(), end, listener(), test_listener_data::lock, NULL, efficiency_task_data::num_tasks_executed, options, efficiency_task_data::pool, efficiency_task_data::shutdown, test_alloc(), test_callbacks, ast_cli_entry::usage, and wait_for_empty_notice().
|
static |
Definition at line 1889 of file test_threadpool.c.
References a, ao2_cleanup, ast_cli(), ast_cond_timedwait, ast_free, ast_mutex_lock, ast_mutex_unlock, ast_taskprocessor_build_name(), AST_TASKPROCESSOR_MAX_NAME, ast_taskprocessor_push(), ast_taskprocessor_unreference(), AST_TEST_FAIL, ast_threadpool_create(), ast_threadpool_listener_alloc(), AST_THREADPOOL_OPTIONS_VERSION, ast_threadpool_serializer(), ast_threadpool_shutdown(), ast_tvnow(), CLI_GENERATE, CLI_INIT, CLI_SUCCESS, ast_cli_entry::command, test_listener_data::cond, end, listener(), test_listener_data::lock, NULL, serializer_efficiency_task_data::num_tasks_executed, options, serializer_efficiency_task_data::serializer, serializer_efficiency_task(), serializer_efficiency_task_data::shutdown, test_alloc(), test_callbacks, ast_cli_entry::usage, and wait_for_empty_notice().
|
static |
Definition at line 1484 of file test_threadpool.c.
References ast_cond_timedwait, ast_tvnow(), end, lock, complex_task_data::lock, complex_task_data::notify_cond, SCOPED_MUTEX, and complex_task_data::task_started.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 243 of file test_threadpool.c.
References AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, ast_threadpool_listener_get_user_data(), test_listener_data::empty_notice, listener(), test_listener_data::num_active, test_listener_data::num_idle, test_listener_data::num_tasks, test_listener_data::task_pushed, and test_listener_data::was_empty.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 2078 of file test_threadpool.c.
References ARRAY_LEN, ast_cli_register_multiple, AST_MODULE_LOAD_SUCCESS, and cli.
|
static |
Definition at line 1459 of file test_threadpool.c.
References ast_cond_signal, complex_task_data::continue_task, lock, complex_task_data::lock, SCOPED_MUTEX, and complex_task_data::stall_cond.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 1862 of file test_threadpool.c.
References ast_atomic_fetchadd_int(), ast_taskprocessor_push(), ast_threadpool_serializer_get_current(), serializer_efficiency_task_data::num_tasks_executed, serializer_efficiency_task_data::serializer, serializer_efficiency_task(), and serializer_efficiency_task_data::shutdown.
Referenced by handle_cli_threadpool_push_serializer_efficiency(), and serializer_efficiency_task().
|
static |
Definition at line 142 of file test_threadpool.c.
References ast_cond_signal, simple_task_data::cond, lock, simple_task_data::lock, SCOPED_MUTEX, and simple_task_data::task_executed.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 118 of file test_threadpool.c.
References ast_calloc, ast_cond_init, ast_mutex_init, simple_task_data::cond, simple_task_data::lock, and NULL.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 130 of file test_threadpool.c.
References ast_cond_destroy, ast_free, ast_mutex_destroy, simple_task_data::cond, and simple_task_data::lock.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 53 of file test_threadpool.c.
References ast_calloc, ast_cond_init, ast_mutex_init, test_listener_data::cond, test_listener_data::lock, and NULL.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), handle_cli_threadpool_push_efficiency(), and handle_cli_threadpool_push_serializer_efficiency().
|
static |
Definition at line 89 of file test_threadpool.c.
References ast_cond_signal, ast_threadpool_listener_get_user_data(), test_listener_data::cond, test_listener_data::empty_notice, listener(), lock, test_listener_data::lock, and SCOPED_MUTEX.
|
static |
Definition at line 98 of file test_threadpool.c.
References ast_cond_destroy, ast_mutex_destroy, ast_threadpool_listener_get_user_data(), test_listener_data::cond, listener(), and test_listener_data::lock.
|
static |
Definition at line 64 of file test_threadpool.c.
References ast_cond_signal, ast_log, ast_threadpool_listener_get_user_data(), test_listener_data::cond, listener(), lock, test_listener_data::lock, LOG_NOTICE, test_listener_data::num_active, test_listener_data::num_idle, and SCOPED_MUTEX.
|
static |
Definition at line 77 of file test_threadpool.c.
References ast_cond_signal, ast_threadpool_listener_get_user_data(), test_listener_data::cond, listener(), lock, test_listener_data::lock, test_listener_data::num_tasks, SCOPED_MUTEX, test_listener_data::task_pushed, and test_listener_data::was_empty.
|
static |
Definition at line 2056 of file test_threadpool.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), and cli.
|
static |
Definition at line 194 of file test_threadpool.c.
References ast_cond_timedwait, AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, ast_tvnow(), simple_task_data::cond, end, lock, simple_task_data::lock, SCOPED_MUTEX, and simple_task_data::task_executed.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 1502 of file test_threadpool.c.
References ast_cond_timedwait, AST_TEST_FAIL, AST_TEST_PASS, ast_tvnow(), end, lock, complex_task_data::lock, complex_task_data::notify_cond, SCOPED_MUTEX, and complex_task_data::task_executed.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), and AST_TEST_DEFINE().
|
static |
Definition at line 1466 of file test_threadpool.c.
References ast_cond_timedwait, ast_tvnow(), end, lock, complex_task_data::lock, complex_task_data::notify_cond, SCOPED_MUTEX, and complex_task_data::task_started.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 217 of file test_threadpool.c.
References ast_cond_timedwait, AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, ast_tvnow(), test_listener_data::cond, test_listener_data::empty_notice, end, lock, test_listener_data::lock, and SCOPED_MUTEX.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), handle_cli_threadpool_push_efficiency(), and handle_cli_threadpool_push_serializer_efficiency().
|
static |
Definition at line 177 of file test_threadpool.c.
References ast_cond_timedwait, ast_threadpool_listener_get_user_data(), ast_tvnow(), test_listener_data::cond, end, listener(), lock, test_listener_data::lock, SCOPED_MUTEX, and test_listener_data::task_pushed.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 151 of file test_threadpool.c.
References ast_cond_timedwait, AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, ast_tvnow(), test_listener_data::cond, end, lock, test_listener_data::lock, test_listener_data::num_active, test_listener_data::num_idle, and SCOPED_MUTEX.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), and wait_until_thread_state_task_pushed().
|
static |
Definition at line 1063 of file test_threadpool.c.
References ast_cond_timedwait, ast_mutex_lock, ast_mutex_unlock, AST_TEST_FAIL, AST_TEST_PASS, ast_test_status_update, ast_tvnow(), test_listener_data::cond, end, test_listener_data::lock, test_listener_data::num_tasks, and wait_until_thread_state().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2100 of file test_threadpool.c.
|
static |
Definition at line 2100 of file test_threadpool.c.
|
static |
Definition at line 2051 of file test_threadpool.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 105 of file test_threadpool.c.
Referenced by AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), AST_TEST_DEFINE(), handle_cli_threadpool_push_efficiency(), and handle_cli_threadpool_push_serializer_efficiency().