summaryrefslogtreecommitdiffstats
path: root/mgmtd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-12-11 17:20:40 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 13:32:17 +0100
commit2453d15dbf7fff2d897c2182886486732be8ac35 (patch)
tree7a054859acf25689f67d5df7aa9d50b20bca4b62 /mgmtd
parent*: Convert a bunch of thread_XX to event_XX (diff)
downloadfrr-2453d15dbf7fff2d897c2182886486732be8ac35.tar.xz
frr-2453d15dbf7fff2d897c2182886486732be8ac35.zip
*: Convert struct thread_master to struct event_master and it's ilk
Convert the `struct thread_master` to `struct event_master` across the code base. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'mgmtd')
-rw-r--r--mgmtd/mgmt.c2
-rw-r--r--mgmtd/mgmt.h4
-rw-r--r--mgmtd/mgmt_be_adapter.c4
-rw-r--r--mgmtd/mgmt_be_adapter.h2
-rw-r--r--mgmtd/mgmt_be_server.c4
-rw-r--r--mgmtd/mgmt_be_server.h2
-rw-r--r--mgmtd/mgmt_fe_adapter.c4
-rw-r--r--mgmtd/mgmt_fe_adapter.h2
-rw-r--r--mgmtd/mgmt_fe_server.c4
-rw-r--r--mgmtd/mgmt_fe_server.h2
-rw-r--r--mgmtd/mgmt_txn.c4
-rw-r--r--mgmtd/mgmt_txn.h2
12 files changed, 18 insertions, 18 deletions
diff --git a/mgmtd/mgmt.c b/mgmtd/mgmt.c
index e1acfde39..f810a865a 100644
--- a/mgmtd/mgmt.c
+++ b/mgmtd/mgmt.c
@@ -27,7 +27,7 @@ static struct mgmt_master mgmt_master;
/* MGMTD process wide configuration pointer to export. */
struct mgmt_master *mm;
-void mgmt_master_init(struct thread_master *master, const int buffer_size)
+void mgmt_master_init(struct event_master *master, const int buffer_size)
{
memset(&mgmt_master, 0, sizeof(struct mgmt_master));
diff --git a/mgmtd/mgmt.h b/mgmtd/mgmt.h
index 2a9d94751..e3111b437 100644
--- a/mgmtd/mgmt.h
+++ b/mgmtd/mgmt.h
@@ -34,7 +34,7 @@ struct mgmt_txn_ctx;
* MGMTD master for system wide configurations and variables.
*/
struct mgmt_master {
- struct thread_master *master;
+ struct event_master *master;
/* How big should we set the socket buffer size */
uint32_t socket_buffer;
@@ -95,7 +95,7 @@ extern time_t mgmt_clock(void);
extern int mgmt_config_write(struct vty *vty);
-extern void mgmt_master_init(struct thread_master *master,
+extern void mgmt_master_init(struct event_master *master,
const int buffer_size);
extern void mgmt_init(void);
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c
index 66184ad2f..6ef8875c9 100644
--- a/mgmtd/mgmt_be_adapter.c
+++ b/mgmtd/mgmt_be_adapter.c
@@ -106,7 +106,7 @@ static struct mgmt_be_xpath_regexp_map
mgmt_xpath_map[MGMTD_BE_MAX_NUM_XPATH_MAP];
static int mgmt_num_xpath_maps;
-static struct thread_master *mgmt_be_adapter_tm;
+static struct event_master *mgmt_be_adapter_tm;
static struct mgmt_be_adapters_head mgmt_be_adapters;
@@ -805,7 +805,7 @@ extern void mgmt_be_adapter_unlock(struct mgmt_be_client_adapter **adapter)
*adapter = NULL;
}
-int mgmt_be_adapter_init(struct thread_master *tm)
+int mgmt_be_adapter_init(struct event_master *tm)
{
if (!mgmt_be_adapter_tm) {
mgmt_be_adapter_tm = tm;
diff --git a/mgmtd/mgmt_be_adapter.h b/mgmtd/mgmt_be_adapter.h
index 6c34e5066..7cf7090e0 100644
--- a/mgmtd/mgmt_be_adapter.h
+++ b/mgmtd/mgmt_be_adapter.h
@@ -92,7 +92,7 @@ struct mgmt_be_client_subscr_info {
};
/* Initialise backend adapter module. */
-extern int mgmt_be_adapter_init(struct thread_master *tm);
+extern int mgmt_be_adapter_init(struct event_master *tm);
/* Destroy the backend adapter module. */
extern void mgmt_be_adapter_destroy(void);
diff --git a/mgmtd/mgmt_be_server.c b/mgmtd/mgmt_be_server.c
index 083e8299f..31ac18501 100644
--- a/mgmtd/mgmt_be_server.c
+++ b/mgmtd/mgmt_be_server.c
@@ -29,7 +29,7 @@
#endif /* REDIRECT_DEBUG_TO_STDERR */
static int mgmt_be_listen_fd = -1;
-static struct thread_master *mgmt_be_listen_tm;
+static struct event_master *mgmt_be_listen_tm;
static struct event *mgmt_be_listen_ev;
static void mgmt_be_server_register_event(enum mgmt_be_event event);
@@ -126,7 +126,7 @@ mgmt_be_server_start_failed:
exit(-1);
}
-int mgmt_be_server_init(struct thread_master *master)
+int mgmt_be_server_init(struct event_master *master)
{
if (mgmt_be_listen_tm) {
MGMTD_BE_SRVR_DBG("MGMTD Backend Server already running!");
diff --git a/mgmtd/mgmt_be_server.h b/mgmtd/mgmt_be_server.h
index 5ee57fdf1..3d0594d16 100644
--- a/mgmtd/mgmt_be_server.h
+++ b/mgmtd/mgmt_be_server.h
@@ -12,7 +12,7 @@
#define MGMTD_BE_MAX_CONN 32
/* Initialise backend server */
-extern int mgmt_be_server_init(struct thread_master *master);
+extern int mgmt_be_server_init(struct event_master *master);
/* Destroy backend server */
extern void mgmt_be_server_destroy(void);
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index 5c6258dc6..6552222ae 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -62,7 +62,7 @@ DECLARE_LIST(mgmt_fe_sessions, struct mgmt_fe_session_ctx, list_linkage);
#define FOREACH_SESSION_IN_LIST(adapter, session) \
frr_each_safe (mgmt_fe_sessions, &(adapter)->fe_sessions, (session))
-static struct thread_master *mgmt_fe_adapter_tm;
+static struct event_master *mgmt_fe_adapter_tm;
static struct mgmt_master *mgmt_fe_adapter_mm;
static struct mgmt_fe_adapters_head mgmt_fe_adapters;
@@ -1549,7 +1549,7 @@ mgmt_fe_adapter_unlock(struct mgmt_fe_client_adapter **adapter)
*adapter = NULL;
}
-int mgmt_fe_adapter_init(struct thread_master *tm, struct mgmt_master *mm)
+int mgmt_fe_adapter_init(struct event_master *tm, struct mgmt_master *mm)
{
if (!mgmt_fe_adapter_tm) {
mgmt_fe_adapter_tm = tm;
diff --git a/mgmtd/mgmt_fe_adapter.h b/mgmtd/mgmt_fe_adapter.h
index 342b766f2..e1af5d0f2 100644
--- a/mgmtd/mgmt_fe_adapter.h
+++ b/mgmtd/mgmt_fe_adapter.h
@@ -82,7 +82,7 @@ struct mgmt_fe_client_adapter {
DECLARE_LIST(mgmt_fe_adapters, struct mgmt_fe_client_adapter, list_linkage);
/* Initialise frontend adapter module */
-extern int mgmt_fe_adapter_init(struct thread_master *tm,
+extern int mgmt_fe_adapter_init(struct event_master *tm,
struct mgmt_master *cm);
/* Destroy frontend adapter module */
diff --git a/mgmtd/mgmt_fe_server.c b/mgmtd/mgmt_fe_server.c
index 2d576663d..07688c59b 100644
--- a/mgmtd/mgmt_fe_server.c
+++ b/mgmtd/mgmt_fe_server.c
@@ -29,7 +29,7 @@
#endif /* REDIRECT_DEBUG_TO_STDERR */
static int mgmt_fe_listen_fd = -1;
-static struct thread_master *mgmt_fe_listen_tm;
+static struct event_master *mgmt_fe_listen_tm;
static struct event *mgmt_fe_listen_ev;
static void mgmt_fe_server_register_event(enum mgmt_fe_event event);
@@ -126,7 +126,7 @@ mgmt_fe_server_start_failed:
exit(-1);
}
-int mgmt_fe_server_init(struct thread_master *master)
+int mgmt_fe_server_init(struct event_master *master)
{
if (mgmt_fe_listen_tm) {
MGMTD_FE_SRVR_DBG("MGMTD Frontend Server already running!");
diff --git a/mgmtd/mgmt_fe_server.h b/mgmtd/mgmt_fe_server.h
index 672ab05c3..0b0171c38 100644
--- a/mgmtd/mgmt_fe_server.h
+++ b/mgmtd/mgmt_fe_server.h
@@ -12,7 +12,7 @@
#define MGMTD_FE_MAX_CONN 32
/* Initialise frontend server */
-extern int mgmt_fe_server_init(struct thread_master *master);
+extern int mgmt_fe_server_init(struct event_master *master);
/* Destroy frontend server */
extern void mgmt_fe_server_destroy(void);
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index 2610d7e85..4d4aad292 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -286,7 +286,7 @@ static int
mgmt_txn_send_be_txn_delete(struct mgmt_txn_ctx *txn,
struct mgmt_be_client_adapter *adapter);
-static struct thread_master *mgmt_txn_tm;
+static struct event_master *mgmt_txn_tm;
static struct mgmt_master *mgmt_txn_mm;
static void mgmt_txn_register_event(struct mgmt_txn_ctx *txn,
@@ -2260,7 +2260,7 @@ static void mgmt_txn_register_event(struct mgmt_txn_ctx *txn,
}
}
-int mgmt_txn_init(struct mgmt_master *mm, struct thread_master *tm)
+int mgmt_txn_init(struct mgmt_master *mm, struct event_master *tm)
{
if (mgmt_txn_mm || mgmt_txn_tm)
assert(!"MGMTD TXN: Call txn_init() only once");
diff --git a/mgmtd/mgmt_txn.h b/mgmtd/mgmt_txn.h
index f026a3993..48ac61913 100644
--- a/mgmtd/mgmt_txn.h
+++ b/mgmtd/mgmt_txn.h
@@ -65,7 +65,7 @@ static inline const char *mgmt_txn_type2str(enum mgmt_txn_type type)
}
/* Initialise transaction module. */
-extern int mgmt_txn_init(struct mgmt_master *cm, struct thread_master *tm);
+extern int mgmt_txn_init(struct mgmt_master *cm, struct event_master *tm);
/* Destroy the transaction module. */
extern void mgmt_txn_destroy(void);