summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.c2
-rw-r--r--lib/event.c20
-rw-r--r--lib/event.h8
-rw-r--r--lib/frr_pthread.c4
-rw-r--r--lib/grammar_sandbox_main.c2
-rw-r--r--lib/libfrr.c4
-rw-r--r--ospfclient/ospfclient.c2
-rw-r--r--tests/bgpd/test_aspath.c2
-rw-r--r--tests/bgpd/test_capability.c2
-rw-r--r--tests/bgpd/test_mp_attr.c2
-rw-r--r--tests/bgpd/test_mpath.c4
-rw-r--r--tests/bgpd/test_packet.c2
-rw-r--r--tests/bgpd/test_peer_attr.c4
-rw-r--r--tests/helpers/c/main.c2
-rw-r--r--tests/isisd/test_isis_spf.c4
-rw-r--r--tests/lib/cli/common_cli.c4
-rw-r--r--tests/lib/fuzz_zlog.c2
-rw-r--r--tests/lib/northbound/test_oper_data.c4
-rw-r--r--tests/lib/test_assert.c2
-rw-r--r--tests/lib/test_grpc.cpp4
-rw-r--r--tests/lib/test_segv.c2
-rw-r--r--tests/lib/test_sig.c2
-rw-r--r--tests/lib/test_timer_correctness.c4
-rw-r--r--tests/lib/test_timer_performance.c4
-rw-r--r--tests/lib/test_zmq.c4
-rw-r--r--tests/ospfd/test_ospf_spf.c4
-rw-r--r--vtysh/vtysh_main.c4
27 files changed, 52 insertions, 52 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 3bf5709c9..33b46f7fe 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -3897,7 +3897,7 @@ int bgp_delete(struct bgp *bgp)
if (bgp->process_queue)
work_queue_free_and_null(&bgp->process_queue);
- thread_master_free_unused(bm->master);
+ event_master_free_unused(bm->master);
bgp_unlock(bgp); /* initial reference */
return 0;
diff --git a/lib/event.c b/lib/event.c
index 3789c5f15..c23f1f8a9 100644
--- a/lib/event.c
+++ b/lib/event.c
@@ -544,7 +544,7 @@ static void initializer(void)
pthread_key_create(&thread_current, NULL);
}
-struct event_master *thread_master_create(const char *name)
+struct event_master *event_master_create(const char *name)
{
struct event_master *rv;
struct rlimit limit;
@@ -623,7 +623,7 @@ struct event_master *thread_master_create(const char *name)
return rv;
}
-void thread_master_set_name(struct event_master *master, const char *name)
+void event_master_set_name(struct event_master *master, const char *name)
{
frr_with_mutex (&master->mtx) {
XFREE(MTYPE_EVENT_MASTER, master->name);
@@ -682,14 +682,14 @@ static void thread_array_free(struct event_master *m,
}
/*
- * thread_master_free_unused
+ * event_master_free_unused
*
* As threads are finished with they are put on the
* unuse list for later reuse.
* If we are shutting down, Free up unused threads
* So we can see if we forget to shut anything off
*/
-void thread_master_free_unused(struct event_master *m)
+void event_master_free_unused(struct event_master *m)
{
frr_with_mutex (&m->mtx) {
struct event *t;
@@ -699,7 +699,7 @@ void thread_master_free_unused(struct event_master *m)
}
/* Stop thread scheduler. */
-void thread_master_free(struct event_master *m)
+void event_master_free(struct event_master *m)
{
struct event *t;
@@ -858,7 +858,7 @@ static int fd_poll(struct event_master *m, const struct timeval *timer_wait,
/*
* If timer_wait is null here, that means poll() should block
- * indefinitely, unless the thread_master has overridden it by setting
+ * indefinitely, unless the event_master has overridden it by setting
* ->selectpoll_timeout.
*
* If the value is positive, it specifies the maximum number of
@@ -1320,7 +1320,7 @@ static void cancel_arg_helper(struct event_master *master,
/**
* Process cancellation requests.
*
- * This may only be run from the pthread which owns the thread_master.
+ * This may only be run from the pthread which owns the event_master.
*
* @param master the thread master to process
* @REQUIRE master->mtx
@@ -1433,7 +1433,7 @@ static void cancel_event_helper(struct event_master *m, void *arg, int flags)
*
* MT-Unsafe
*
- * @param m the thread_master to cancel from
+ * @param m the event_master to cancel from
* @param arg the argument passed when creating the event
*/
void event_cancel_event(struct event_master *master, void *arg)
@@ -1446,7 +1446,7 @@ void event_cancel_event(struct event_master *master, void *arg)
*
* MT-Unsafe
*
- * @param m the thread_master to cancel from
+ * @param m the event_master to cancel from
* @param arg the argument passed when creating the event
*/
void event_cancel_event_ready(struct event_master *m, void *arg)
@@ -1502,7 +1502,7 @@ void event_cancel(struct event **thread)
* The last two parameters are mutually exclusive, i.e. if you pass one the
* other must be NULL.
*
- * When the cancellation procedure executes on the target thread_master, the
+ * When the cancellation procedure executes on the target event_master, the
* thread * provided is checked for nullity. If it is null, the thread is
* assumed to no longer exist and the cancellation request is a no-op. Thus
* users of this API must pass a back-reference when scheduling the original
diff --git a/lib/event.h b/lib/event.h
index 9f8e8831f..7ea4152e5 100644
--- a/lib/event.h
+++ b/lib/event.h
@@ -209,10 +209,10 @@ struct cpu_event_history {
}) /* end */
/* Prototypes. */
-extern struct event_master *thread_master_create(const char *name);
-void thread_master_set_name(struct event_master *master, const char *name);
-extern void thread_master_free(struct event_master *m);
-extern void thread_master_free_unused(struct event_master *m);
+extern struct event_master *event_master_create(const char *name);
+void event_master_set_name(struct event_master *master, const char *name);
+extern void event_master_free(struct event_master *m);
+extern void event_master_free_unused(struct event_master *m);
extern void _event_add_read_write(const struct xref_eventsched *xref,
struct event_master *master,
diff --git a/lib/frr_pthread.c b/lib/frr_pthread.c
index 0c7d2c475..c4ead01bf 100644
--- a/lib/frr_pthread.c
+++ b/lib/frr_pthread.c
@@ -75,7 +75,7 @@ struct frr_pthread *frr_pthread_new(const struct frr_pthread_attr *attr,
/* initialize mutex */
pthread_mutex_init(&fpt->mtx, NULL);
/* create new thread master */
- fpt->master = thread_master_create(name);
+ fpt->master = event_master_create(name);
/* set attributes */
fpt->attr = *attr;
name = (name ? name : "Anonymous thread");
@@ -101,7 +101,7 @@ struct frr_pthread *frr_pthread_new(const struct frr_pthread_attr *attr,
static void frr_pthread_destroy_nolock(struct frr_pthread *fpt)
{
- thread_master_free(fpt->master);
+ event_master_free(fpt->master);
pthread_mutex_destroy(&fpt->mtx);
pthread_mutex_destroy(fpt->running_cond_mtx);
pthread_cond_destroy(fpt->running_cond);
diff --git a/lib/grammar_sandbox_main.c b/lib/grammar_sandbox_main.c
index 1e0f67a11..5f72dcbeb 100644
--- a/lib/grammar_sandbox_main.c
+++ b/lib/grammar_sandbox_main.c
@@ -29,7 +29,7 @@ int main(int argc, char **argv)
{
struct event event;
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
zlog_aux_init("NONE: ", LOG_DEBUG);
diff --git a/lib/libfrr.c b/lib/libfrr.c
index d7e87adc4..6b7579712 100644
--- a/lib/libfrr.c
+++ b/lib/libfrr.c
@@ -769,7 +769,7 @@ struct event_master *frr_init(void)
zprivs_init(di->privs);
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
signal_init(master, di->n_signals, di->signals);
hook_call(frr_early_init, master);
@@ -1213,7 +1213,7 @@ void frr_fini(void)
frr_pthread_finish();
zprivs_terminate(di->privs);
/* signal_init -> nothing needed */
- thread_master_free(master);
+ event_master_free(master);
master = NULL;
zlog_tls_buffer_fini();
zlog_fini();
diff --git a/ospfclient/ospfclient.c b/ospfclient/ospfclient.c
index d3ba642d7..b884e0e0e 100644
--- a/ospfclient/ospfclient.c
+++ b/ospfclient/ospfclient.c
@@ -293,7 +293,7 @@ int main(int argc, char *argv[])
/* Initialization */
zprivs_preinit(&ospfd_privs);
zprivs_init(&ospfd_privs);
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
/* Open connection to OSPF daemon */
oclient = ospf_apiclient_connect(args[1], ASYNCPORT);
diff --git a/tests/bgpd/test_aspath.c b/tests/bgpd/test_aspath.c
index a20116a43..5460be101 100644
--- a/tests/bgpd/test_aspath.c
+++ b/tests/bgpd/test_aspath.c
@@ -1405,7 +1405,7 @@ int main(void)
{
int i = 0;
qobj_init();
- bgp_master_init(thread_master_create(NULL), BGP_SOCKET_SNDBUF_SIZE,
+ bgp_master_init(event_master_create(NULL), BGP_SOCKET_SNDBUF_SIZE,
list_new());
master = bm->master;
bgp_option_set(BGP_OPT_NO_LISTEN);
diff --git a/tests/bgpd/test_capability.c b/tests/bgpd/test_capability.c
index ab36a0a32..9ba43e14f 100644
--- a/tests/bgpd/test_capability.c
+++ b/tests/bgpd/test_capability.c
@@ -925,7 +925,7 @@ int main(void)
term_bgp_debug_as4 = -1UL;
qobj_init();
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
vrf_init(NULL, NULL, NULL, NULL);
bgp_option_set(BGP_OPT_NO_LISTEN);
diff --git a/tests/bgpd/test_mp_attr.c b/tests/bgpd/test_mp_attr.c
index ef4255940..96daa182d 100644
--- a/tests/bgpd/test_mp_attr.c
+++ b/tests/bgpd/test_mp_attr.c
@@ -1070,7 +1070,7 @@ int main(void)
qobj_init();
cmd_init(0);
bgp_vty_init();
- master = thread_master_create("test mp attr");
+ master = event_master_create("test mp attr");
bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
vrf_init(NULL, NULL, NULL, NULL);
bgp_option_set(BGP_OPT_NO_LISTEN);
diff --git a/tests/bgpd/test_mpath.c b/tests/bgpd/test_mpath.c
index 3eea19e8f..348ce9e45 100644
--- a/tests/bgpd/test_mpath.c
+++ b/tests/bgpd/test_mpath.c
@@ -378,7 +378,7 @@ int all_tests_count = array_size(all_tests);
static int global_test_init(void)
{
qobj_init();
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
zclient = zclient_new(master, &zclient_options_default, NULL, 0);
bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
vrf_init(NULL, NULL, NULL, NULL);
@@ -393,7 +393,7 @@ static int global_test_cleanup(void)
{
if (zclient != NULL)
zclient_free(zclient);
- thread_master_free(master);
+ event_master_free(master);
return 0;
}
diff --git a/tests/bgpd/test_packet.c b/tests/bgpd/test_packet.c
index 6563d5eb9..3492a95fa 100644
--- a/tests/bgpd/test_packet.c
+++ b/tests/bgpd/test_packet.c
@@ -45,7 +45,7 @@ int main(int argc, char *argv[])
qobj_init();
bgp_attr_init();
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
vrf_init(NULL, NULL, NULL, NULL);
bgp_option_set(BGP_OPT_NO_LISTEN);
diff --git a/tests/bgpd/test_peer_attr.c b/tests/bgpd/test_peer_attr.c
index a6a5d6097..349a51634 100644
--- a/tests/bgpd/test_peer_attr.c
+++ b/tests/bgpd/test_peer_attr.c
@@ -1363,7 +1363,7 @@ static void bgp_startup(void)
zprivs_preinit(&bgpd_privs);
zprivs_init(&bgpd_privs);
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
nb_init(master, NULL, 0, false);
bgp_master_init(master, BGP_SOCKET_SNDBUF_SIZE, list_new());
bgp_option_set(BGP_OPT_NO_LISTEN);
@@ -1412,7 +1412,7 @@ static void bgp_shutdown(void)
nb_terminate();
yang_terminate();
zprivs_terminate(&bgpd_privs);
- thread_master_free(master);
+ event_master_free(master);
master = NULL;
}
diff --git a/tests/helpers/c/main.c b/tests/helpers/c/main.c
index 4ae72fa29..d5be75046 100644
--- a/tests/helpers/c/main.c
+++ b/tests/helpers/c/main.c
@@ -92,7 +92,7 @@ int main(int argc, char **argv)
progname = ((p = strrchr(argv[0], '/')) ? ++p : argv[0]);
/* master init. */
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
while (1) {
int opt;
diff --git a/tests/isisd/test_isis_spf.c b/tests/isisd/test_isis_spf.c
index d7465cc8f..b14ef2907 100644
--- a/tests/isisd/test_isis_spf.c
+++ b/tests/isisd/test_isis_spf.c
@@ -455,7 +455,7 @@ static void vty_do_exit(int isexit)
cmd_terminate();
vty_terminate();
yang_terminate();
- thread_master_free(master);
+ event_master_free(master);
log_memstats(stderr, "test-isis-spf");
if (!isexit)
@@ -521,7 +521,7 @@ int main(int argc, char **argv)
}
/* master init. */
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
isis_master_init(master);
/* Library inits. */
diff --git a/tests/lib/cli/common_cli.c b/tests/lib/cli/common_cli.c
index 843baa1f6..bc3a4b534 100644
--- a/tests/lib/cli/common_cli.c
+++ b/tests/lib/cli/common_cli.c
@@ -39,7 +39,7 @@ static void vty_do_exit(int isexit)
vty_terminate();
nb_terminate();
yang_terminate();
- thread_master_free(master);
+ event_master_free(master);
log_memstats(stderr, "testcli");
if (!isexit)
@@ -59,7 +59,7 @@ int main(int argc, char **argv)
umask(0027);
/* master init. */
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
zlog_aux_init("NONE: ", test_log_prio);
diff --git a/tests/lib/fuzz_zlog.c b/tests/lib/fuzz_zlog.c
index ad9677a71..d308f8eb2 100644
--- a/tests/lib/fuzz_zlog.c
+++ b/tests/lib/fuzz_zlog.c
@@ -94,7 +94,7 @@ int main(int argc, char **argv)
cfg->fd = fd;
cmd_hostname_set("TEST");
- cfg->master = thread_master_create("TEST");
+ cfg->master = event_master_create("TEST");
zlog_5424_apply_dst(cfg);
diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c
index 7329cf1af..e7d5328bb 100644
--- a/tests/lib/northbound/test_oper_data.c
+++ b/tests/lib/northbound/test_oper_data.c
@@ -351,7 +351,7 @@ static void vty_do_exit(int isexit)
vty_terminate();
nb_terminate();
yang_terminate();
- thread_master_free(master);
+ event_master_free(master);
log_memstats(stderr, "test-nb-oper-data");
if (!isexit)
@@ -377,7 +377,7 @@ int main(int argc, char **argv)
umask(0027);
/* master init. */
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
zlog_aux_init("NONE: ", ZLOG_DISABLED);
diff --git a/tests/lib/test_assert.c b/tests/lib/test_assert.c
index 356be12c1..cefdc113a 100644
--- a/tests/lib/test_assert.c
+++ b/tests/lib/test_assert.c
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
assertf(number > 1, "(B) the number was %d", number);
/* set up SIGABRT handler */
- master = thread_master_create("test");
+ master = event_master_create("test");
signal_init(master, 0, NULL);
func_for_bt(number);
diff --git a/tests/lib/test_grpc.cpp b/tests/lib/test_grpc.cpp
index 3bfe98a66..dd067e9f1 100644
--- a/tests/lib/test_grpc.cpp
+++ b/tests/lib/test_grpc.cpp
@@ -97,7 +97,7 @@ static void static_startup(void)
static_debug_init();
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
nb_init(master, staticd_yang_modules, array_size(staticd_yang_modules),
false);
@@ -139,7 +139,7 @@ static void static_shutdown(void)
cmd_terminate();
nb_terminate();
yang_terminate();
- thread_master_free(master);
+ event_master_free(master);
master = NULL;
}
diff --git a/tests/lib/test_segv.c b/tests/lib/test_segv.c
index 91c29c5ad..b417ac536 100644
--- a/tests/lib/test_segv.c
+++ b/tests/lib/test_segv.c
@@ -56,7 +56,7 @@ static void threadfunc(struct event *thread)
int main(void)
{
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
signal_init(master, array_size(sigs), sigs);
zlog_aux_init("NONE: ", LOG_DEBUG);
diff --git a/tests/lib/test_sig.c b/tests/lib/test_sig.c
index 28101a241..e3005f744 100644
--- a/tests/lib/test_sig.c
+++ b/tests/lib/test_sig.c
@@ -40,7 +40,7 @@ struct event t;
int main(void)
{
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
signal_init(master, array_size(sigs), sigs);
zlog_aux_init("NONE: ", LOG_DEBUG);
diff --git a/tests/lib/test_timer_correctness.c b/tests/lib/test_timer_correctness.c
index ae5ec1dc7..c8ae5fa19 100644
--- a/tests/lib/test_timer_correctness.c
+++ b/tests/lib/test_timer_correctness.c
@@ -54,7 +54,7 @@ static void terminate_test(void)
exit_code = 0;
}
- thread_master_free(master);
+ event_master_free(master);
XFREE(MTYPE_TMP, log_buf);
XFREE(MTYPE_TMP, expected_buf);
prng_free(prng);
@@ -97,7 +97,7 @@ int main(int argc, char **argv)
struct event t;
struct timeval **alarms;
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
log_buf_len = SCHEDULE_TIMERS * (TIMESTR_LEN + 1) + 1;
log_buf_pos = 0;
diff --git a/tests/lib/test_timer_performance.c b/tests/lib/test_timer_performance.c
index 017d90334..f197a8d03 100644
--- a/tests/lib/test_timer_performance.c
+++ b/tests/lib/test_timer_performance.c
@@ -34,7 +34,7 @@ int main(int argc, char **argv)
struct timeval tv_start, tv_lap, tv_stop;
unsigned long t_schedule, t_remove;
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
prng = prng_new(0);
timers = calloc(SCHEDULE_TIMERS, sizeof(*timers));
@@ -80,7 +80,7 @@ int main(int argc, char **argv)
fflush(stdout);
free(timers);
- thread_master_free(master);
+ event_master_free(master);
prng_free(prng);
return 0;
}
diff --git a/tests/lib/test_zmq.c b/tests/lib/test_zmq.c
index bb6a29e68..dd9d10b97 100644
--- a/tests/lib/test_zmq.c
+++ b/tests/lib/test_zmq.c
@@ -266,7 +266,7 @@ static void run_server(int syncfd)
char dummy = 0;
struct event t;
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
signal_init(master, array_size(sigs), sigs);
frrzmq_init();
@@ -284,7 +284,7 @@ static void run_server(int syncfd)
zmq_close(zmqsock);
frrzmq_finish();
- thread_master_free(master);
+ event_master_free(master);
log_memstats_stderr("test");
}
diff --git a/tests/ospfd/test_ospf_spf.c b/tests/ospfd/test_ospf_spf.c
index 2bf3a9f76..7d1d7ae26 100644
--- a/tests/ospfd/test_ospf_spf.c
+++ b/tests/ospfd/test_ospf_spf.c
@@ -208,7 +208,7 @@ static void vty_do_exit(int isexit)
cmd_terminate();
vty_terminate();
- thread_master_free(master);
+ event_master_free(master);
if (!isexit)
exit(0);
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
}
/* master init. */
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
/* Library inits. */
cmd_init(1);
diff --git a/vtysh/vtysh_main.c b/vtysh/vtysh_main.c
index 47517010b..7b92ac220 100644
--- a/vtysh/vtysh_main.c
+++ b/vtysh/vtysh_main.c
@@ -228,7 +228,7 @@ static void vtysh_rl_run(void)
{
struct event thread;
- master = thread_master_create(NULL);
+ master = event_master_create(NULL);
rl_callback_handler_install(vtysh_prompt(), vtysh_rl_callback);
event_add_read(master, vtysh_rl_read, NULL, STDIN_FILENO,
@@ -240,7 +240,7 @@ static void vtysh_rl_run(void)
if (!vtysh_loop_exited)
rl_callback_handler_remove();
- thread_master_free(master);
+ event_master_free(master);
}
static void log_it(const char *line)