summaryrefslogtreecommitdiffstats
path: root/mgmtd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-12-25 16:26:52 +0100
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 13:32:17 +0100
commite16d030c65ca97b1ba68b93ada93b1d4edde59d3 (patch)
treee3a57a2e2887a899cad71c0640047b2b2409b5fa /mgmtd
parentlib, zebra: Convert THREAD_TIMER_STRLEN to EVENT_TIMER_STRLEN (diff)
downloadfrr-e16d030c65ca97b1ba68b93ada93b1d4edde59d3.tar.xz
frr-e16d030c65ca97b1ba68b93ada93b1d4edde59d3.zip
*: Convert THREAD_XXX macros to EVENT_XXX macros
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'mgmtd')
-rw-r--r--mgmtd/mgmt_be_adapter.c20
-rw-r--r--mgmtd/mgmt_be_server.c2
-rw-r--r--mgmtd/mgmt_fe_adapter.c20
-rw-r--r--mgmtd/mgmt_fe_server.c2
-rw-r--r--mgmtd/mgmt_txn.c24
5 files changed, 34 insertions, 34 deletions
diff --git a/mgmtd/mgmt_be_adapter.c b/mgmtd/mgmt_be_adapter.c
index 6ef8875c9..a4ba75869 100644
--- a/mgmtd/mgmt_be_adapter.c
+++ b/mgmtd/mgmt_be_adapter.c
@@ -616,7 +616,7 @@ static void mgmt_be_adapter_process_msg(void *user_ctx, uint8_t *data,
static void mgmt_be_adapter_proc_msgbufs(struct event *thread)
{
- struct mgmt_be_client_adapter *adapter = THREAD_ARG(thread);
+ struct mgmt_be_client_adapter *adapter = EVENT_ARG(thread);
if (mgmt_msg_procbufs(&adapter->mstate, mgmt_be_adapter_process_msg,
adapter, mgmt_debug_be))
@@ -628,7 +628,7 @@ static void mgmt_be_adapter_read(struct event *thread)
struct mgmt_be_client_adapter *adapter;
enum mgmt_msg_rsched rv;
- adapter = (struct mgmt_be_client_adapter *)THREAD_ARG(thread);
+ adapter = (struct mgmt_be_client_adapter *)EVENT_ARG(thread);
rv = mgmt_msg_read(&adapter->mstate, adapter->conn_fd, mgmt_debug_be);
if (rv == MSR_DISCONNECT) {
@@ -642,7 +642,7 @@ static void mgmt_be_adapter_read(struct event *thread)
static void mgmt_be_adapter_write(struct event *thread)
{
- struct mgmt_be_client_adapter *adapter = THREAD_ARG(thread);
+ struct mgmt_be_client_adapter *adapter = EVENT_ARG(thread);
enum mgmt_msg_wsched rv;
rv = mgmt_msg_write(&adapter->mstate, adapter->conn_fd, mgmt_debug_be);
@@ -662,7 +662,7 @@ static void mgmt_be_adapter_resume_writes(struct event *thread)
{
struct mgmt_be_client_adapter *adapter;
- adapter = (struct mgmt_be_client_adapter *)THREAD_ARG(thread);
+ adapter = (struct mgmt_be_client_adapter *)EVENT_ARG(thread);
assert(adapter && adapter->conn_fd >= 0);
mgmt_be_adapter_writes_on(adapter);
@@ -699,7 +699,7 @@ static void mgmt_be_adapter_conn_init(struct event *thread)
{
struct mgmt_be_client_adapter *adapter;
- adapter = (struct mgmt_be_client_adapter *)THREAD_ARG(thread);
+ adapter = (struct mgmt_be_client_adapter *)EVENT_ARG(thread);
assert(adapter && adapter->conn_fd >= 0);
/*
@@ -793,11 +793,11 @@ extern void mgmt_be_adapter_unlock(struct mgmt_be_client_adapter **adapter)
(*adapter)->refcount--;
if (!(*adapter)->refcount) {
mgmt_be_adapters_del(&mgmt_be_adapters, *adapter);
- THREAD_OFF((*adapter)->conn_init_ev);
- THREAD_OFF((*adapter)->conn_read_ev);
- THREAD_OFF((*adapter)->conn_write_ev);
- THREAD_OFF((*adapter)->conn_writes_on);
- THREAD_OFF((*adapter)->proc_msg_ev);
+ EVENT_OFF((*adapter)->conn_init_ev);
+ EVENT_OFF((*adapter)->conn_read_ev);
+ EVENT_OFF((*adapter)->conn_write_ev);
+ EVENT_OFF((*adapter)->conn_writes_on);
+ EVENT_OFF((*adapter)->proc_msg_ev);
mgmt_msg_destroy(&(*adapter)->mstate);
XFREE(MTYPE_MGMTD_BE_ADPATER, *adapter);
}
diff --git a/mgmtd/mgmt_be_server.c b/mgmtd/mgmt_be_server.c
index 31ac18501..c985e2d0b 100644
--- a/mgmtd/mgmt_be_server.c
+++ b/mgmtd/mgmt_be_server.c
@@ -146,7 +146,7 @@ void mgmt_be_server_destroy(void)
MGMTD_BE_SRVR_DBG("Closing MGMTD Backend Server!");
if (mgmt_be_listen_ev) {
- THREAD_OFF(mgmt_be_listen_ev);
+ EVENT_OFF(mgmt_be_listen_ev);
mgmt_be_listen_ev = NULL;
}
diff --git a/mgmtd/mgmt_fe_adapter.c b/mgmtd/mgmt_fe_adapter.c
index 6552222ae..bb0ca4af0 100644
--- a/mgmtd/mgmt_fe_adapter.c
+++ b/mgmtd/mgmt_fe_adapter.c
@@ -633,7 +633,7 @@ static void mgmt_fe_session_cfg_txn_clnup(struct event *thread)
{
struct mgmt_fe_session_ctx *session;
- session = (struct mgmt_fe_session_ctx *)THREAD_ARG(thread);
+ session = (struct mgmt_fe_session_ctx *)EVENT_ARG(thread);
mgmt_fe_session_cfg_txn_cleanup(session);
}
@@ -642,7 +642,7 @@ static void mgmt_fe_session_show_txn_clnup(struct event *thread)
{
struct mgmt_fe_session_ctx *session;
- session = (struct mgmt_fe_session_ctx *)THREAD_ARG(thread);
+ session = (struct mgmt_fe_session_ctx *)EVENT_ARG(thread);
mgmt_fe_session_show_txn_cleanup(session);
}
@@ -1437,7 +1437,7 @@ static void mgmt_fe_adapter_process_msg(void *user_ctx, uint8_t *data,
static void mgmt_fe_adapter_proc_msgbufs(struct event *thread)
{
- struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
+ struct mgmt_fe_client_adapter *adapter = EVENT_ARG(thread);
if (mgmt_msg_procbufs(&adapter->mstate, mgmt_fe_adapter_process_msg,
adapter, mgmt_debug_fe))
@@ -1446,7 +1446,7 @@ static void mgmt_fe_adapter_proc_msgbufs(struct event *thread)
static void mgmt_fe_adapter_read(struct event *thread)
{
- struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
+ struct mgmt_fe_client_adapter *adapter = EVENT_ARG(thread);
enum mgmt_msg_rsched rv;
rv = mgmt_msg_read(&adapter->mstate, adapter->conn_fd, mgmt_debug_fe);
@@ -1461,7 +1461,7 @@ static void mgmt_fe_adapter_read(struct event *thread)
static void mgmt_fe_adapter_write(struct event *thread)
{
- struct mgmt_fe_client_adapter *adapter = THREAD_ARG(thread);
+ struct mgmt_fe_client_adapter *adapter = EVENT_ARG(thread);
enum mgmt_msg_wsched rv;
rv = mgmt_msg_write(&adapter->mstate, adapter->conn_fd, mgmt_debug_fe);
@@ -1481,7 +1481,7 @@ static void mgmt_fe_adapter_resume_writes(struct event *thread)
{
struct mgmt_fe_client_adapter *adapter;
- adapter = (struct mgmt_fe_client_adapter *)THREAD_ARG(thread);
+ adapter = (struct mgmt_fe_client_adapter *)EVENT_ARG(thread);
assert(adapter && adapter->conn_fd != -1);
mgmt_fe_adapter_writes_on(adapter);
@@ -1538,10 +1538,10 @@ mgmt_fe_adapter_unlock(struct mgmt_fe_client_adapter **adapter)
(*adapter)->refcount--;
if (!(*adapter)->refcount) {
mgmt_fe_adapters_del(&mgmt_fe_adapters, *adapter);
- THREAD_OFF((*adapter)->conn_read_ev);
- THREAD_OFF((*adapter)->conn_write_ev);
- THREAD_OFF((*adapter)->proc_msg_ev);
- THREAD_OFF((*adapter)->conn_writes_on);
+ EVENT_OFF((*adapter)->conn_read_ev);
+ EVENT_OFF((*adapter)->conn_write_ev);
+ EVENT_OFF((*adapter)->proc_msg_ev);
+ EVENT_OFF((*adapter)->conn_writes_on);
mgmt_msg_destroy(&(*adapter)->mstate);
XFREE(MTYPE_MGMTD_FE_ADPATER, *adapter);
}
diff --git a/mgmtd/mgmt_fe_server.c b/mgmtd/mgmt_fe_server.c
index 07688c59b..5e5f32cde 100644
--- a/mgmtd/mgmt_fe_server.c
+++ b/mgmtd/mgmt_fe_server.c
@@ -146,7 +146,7 @@ void mgmt_fe_server_destroy(void)
MGMTD_FE_SRVR_DBG("Closing MGMTD Frontend Server!");
if (mgmt_fe_listen_ev) {
- THREAD_OFF(mgmt_fe_listen_ev);
+ EVENT_OFF(mgmt_fe_listen_ev);
mgmt_fe_listen_ev = NULL;
}
diff --git a/mgmtd/mgmt_txn.c b/mgmtd/mgmt_txn.c
index 4d4aad292..b0b726b58 100644
--- a/mgmtd/mgmt_txn.c
+++ b/mgmtd/mgmt_txn.c
@@ -628,7 +628,7 @@ static void mgmt_txn_process_set_cfg(struct event *thread)
struct mgmt_commit_stats *cmt_stats;
int ret = 0;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
cmt_stats = mgmt_fe_get_session_commit_stats(txn->session_id);
@@ -780,7 +780,7 @@ static int mgmt_txn_send_commit_cfg_reply(struct mgmt_txn_ctx *txn,
if (success) {
/* Stop the commit-timeout timer */
- THREAD_OFF(txn->comm_cfg_timeout);
+ EVENT_OFF(txn->comm_cfg_timeout);
create_cmt_info_rec =
(result != MGMTD_NO_CFG_CHANGES &&
@@ -1458,7 +1458,7 @@ static void mgmt_txn_cfg_commit_timedout(struct event *thread)
{
struct mgmt_txn_ctx *txn;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
assert(txn->type == MGMTD_TXN_TYPE_CONFIG);
@@ -1549,7 +1549,7 @@ static void mgmt_txn_process_commit_cfg(struct event *thread)
struct mgmt_txn_ctx *txn;
struct mgmt_commit_cfg_req *cmtcfg_req;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
MGMTD_TXN_DBG(
@@ -1615,7 +1615,7 @@ static void mgmt_txn_process_commit_cfg(struct event *thread)
* cleanup. Please see mgmt_fe_send_commit_cfg_reply() for
* more details.
*/
- THREAD_OFF(txn->comm_cfg_timeout);
+ EVENT_OFF(txn->comm_cfg_timeout);
mgmt_txn_send_commit_cfg_reply(txn, MGMTD_SUCCESS, NULL);
break;
case MGMTD_COMMIT_PHASE_MAX:
@@ -1882,7 +1882,7 @@ static void mgmt_txn_process_get_cfg(struct event *thread)
int num_processed = 0;
bool error;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
MGMTD_TXN_DBG(
@@ -1949,7 +1949,7 @@ static void mgmt_txn_process_get_data(struct event *thread)
int num_processed = 0;
bool error;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
MGMTD_TXN_DBG(
@@ -2170,10 +2170,10 @@ static void mgmt_txn_unlock(struct mgmt_txn_ctx **txn, const char *file,
if ((*txn)->type == MGMTD_TXN_TYPE_CONFIG)
if (mgmt_txn_mm->cfg_txn == *txn)
mgmt_txn_mm->cfg_txn = NULL;
- THREAD_OFF((*txn)->proc_get_cfg);
- THREAD_OFF((*txn)->proc_get_data);
- THREAD_OFF((*txn)->proc_comm_cfg);
- THREAD_OFF((*txn)->comm_cfg_timeout);
+ EVENT_OFF((*txn)->proc_get_cfg);
+ EVENT_OFF((*txn)->proc_get_data);
+ EVENT_OFF((*txn)->proc_comm_cfg);
+ EVENT_OFF((*txn)->comm_cfg_timeout);
hash_release(mgmt_txn_mm->txn_hash, *txn);
mgmt_txns_del(&mgmt_txn_mm->txn_list, *txn);
@@ -2210,7 +2210,7 @@ static void mgmt_txn_cleanup(struct event *thread)
{
struct mgmt_txn_ctx *txn;
- txn = (struct mgmt_txn_ctx *)THREAD_ARG(thread);
+ txn = (struct mgmt_txn_ctx *)EVENT_ARG(thread);
assert(txn);
mgmt_txn_cleanup_txn(&txn);