diff options
author | Donald Sharp <sharpd@nvidia.com> | 2023-03-07 20:14:41 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 13:32:17 +0100 |
commit | cd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1 (patch) | |
tree | f97009b8971d71b4c05cbc0d00b98608efd40e44 /mgmtd | |
parent | *: Convert thread_master_XXX functions to event_master_XXX (diff) | |
download | frr-cd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1.tar.xz frr-cd9d0537411d0a74cd19ae36f6d3716c8ccbb4c1.zip |
*: Convert `struct event_master` to `struct event_loop`
Let's find a better name for it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'mgmtd')
-rw-r--r-- | mgmtd/mgmt.c | 2 | ||||
-rw-r--r-- | mgmtd/mgmt.h | 5 | ||||
-rw-r--r-- | mgmtd/mgmt_be_adapter.c | 4 | ||||
-rw-r--r-- | mgmtd/mgmt_be_adapter.h | 2 | ||||
-rw-r--r-- | mgmtd/mgmt_be_server.c | 4 | ||||
-rw-r--r-- | mgmtd/mgmt_be_server.h | 2 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_adapter.c | 4 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_adapter.h | 3 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_server.c | 4 | ||||
-rw-r--r-- | mgmtd/mgmt_fe_server.h | 2 | ||||
-rw-r--r-- | mgmtd/mgmt_txn.c | 4 | ||||
-rw-r--r-- | mgmtd/mgmt_txn.h | 2 |
12 files changed, 18 insertions, 20 deletions
diff --git a/mgmtd/mgmt.c b/mgmtd/mgmt.c index f810a865a..a5c0eb34a 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 event_master *master, const int buffer_size) +void mgmt_master_init(struct event_loop *master, const int buffer_size) { memset(&mgmt_master, 0, sizeof(struct mgmt_master)); diff --git a/mgmtd/mgmt.h b/mgmtd/mgmt.h index e3111b437..4d186c176 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 event_master *master; + struct event_loop *master; /* How big should we set the socket buffer size */ uint32_t socket_buffer; @@ -95,8 +95,7 @@ extern time_t mgmt_clock(void); extern int mgmt_config_write(struct vty *vty); -extern void mgmt_master_init(struct event_master *master, - const int buffer_size); +extern void mgmt_master_init(struct event_loop *master, const int buffer_size); extern void mgmt_init(void); extern void mgmt_vty_init(void); diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c index a4ba75869..c85b3549b 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 event_master *mgmt_be_adapter_tm; +static struct event_loop *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 event_master *tm) +int mgmt_be_adapter_init(struct event_loop *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 7cf7090e0..88d54a784 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 event_master *tm); +extern int mgmt_be_adapter_init(struct event_loop *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 c985e2d0b..0fa7ddd6d 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 event_master *mgmt_be_listen_tm; +static struct event_loop *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 event_master *master) +int mgmt_be_server_init(struct event_loop *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 3d0594d16..63731a0ef 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 event_master *master); +extern int mgmt_be_server_init(struct event_loop *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 bb0ca4af0..ba4ac9f08 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 event_master *mgmt_fe_adapter_tm; +static struct event_loop *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 event_master *tm, struct mgmt_master *mm) +int mgmt_fe_adapter_init(struct event_loop *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 e1af5d0f2..6f7283703 100644 --- a/mgmtd/mgmt_fe_adapter.h +++ b/mgmtd/mgmt_fe_adapter.h @@ -82,8 +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 event_master *tm, - struct mgmt_master *cm); +extern int mgmt_fe_adapter_init(struct event_loop *tm, struct mgmt_master *cm); /* Destroy frontend adapter module */ extern void mgmt_fe_adapter_destroy(void); diff --git a/mgmtd/mgmt_fe_server.c b/mgmtd/mgmt_fe_server.c index 5e5f32cde..6097c23aa 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 event_master *mgmt_fe_listen_tm; +static struct event_loop *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 event_master *master) +int mgmt_fe_server_init(struct event_loop *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 0b0171c38..6f676ba4d 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 event_master *master); +extern int mgmt_fe_server_init(struct event_loop *master); /* Destroy frontend server */ extern void mgmt_fe_server_destroy(void); diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c index b0b726b58..b5f61d3bc 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 event_master *mgmt_txn_tm; +static struct event_loop *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 event_master *tm) +int mgmt_txn_init(struct mgmt_master *mm, struct event_loop *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 48ac61913..be781ab95 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 event_master *tm); +extern int mgmt_txn_init(struct mgmt_master *cm, struct event_loop *tm); /* Destroy the transaction module. */ extern void mgmt_txn_destroy(void); |