diff options
author | Donald Sharp <sharpd@nvidia.com> | 2022-05-20 20:19:08 +0200 |
---|---|---|
committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 13:32:17 +0100 |
commit | 907a2395f423e3b97335d554557c2cef7195db84 (patch) | |
tree | 18ea691bc5589fa570c739a9f221429633778ea9 /zebra/zserv.c | |
parent | *: Rename `struct thread` to `struct event` (diff) | |
download | frr-907a2395f423e3b97335d554557c2cef7195db84.tar.xz frr-907a2395f423e3b97335d554557c2cef7195db84.zip |
*: Convert thread_add_XXX functions to event_add_XXX
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/zserv.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/zebra/zserv.c b/zebra/zserv.c index ba05e860a..c3ef1557b 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -100,7 +100,7 @@ enum zserv_event { /* * Zebra server event driver for all client threads. * - * This is essentially a wrapper around thread_add_event() that centralizes + * This is essentially a wrapper around event_add_event() that centralizes * those scheduling calls into one place. * * All calls to this function schedule an event on the pthread running the @@ -118,7 +118,7 @@ static void zserv_client_event(struct zserv *client, /* * Zebra server event driver for the main thread. * - * This is essentially a wrapper around thread_add_event() that centralizes + * This is essentially a wrapper around event_add_event() that centralizes * those scheduling calls into one place. * * All calls to this function schedule an event on Zebra's main pthread. @@ -462,12 +462,12 @@ static void zserv_client_event(struct zserv *client, { switch (event) { case ZSERV_CLIENT_READ: - thread_add_read(client->pthread->master, zserv_read, client, - client->sock, &client->t_read); + event_add_read(client->pthread->master, zserv_read, client, + client->sock, &client->t_read); break; case ZSERV_CLIENT_WRITE: - thread_add_write(client->pthread->master, zserv_write, client, - client->sock, &client->t_write); + event_add_write(client->pthread->master, zserv_write, client, + client->sock, &client->t_write); break; } } @@ -831,9 +831,9 @@ void zserv_release_client(struct zserv *client) * main pthread. */ if (client->is_closed) - thread_add_event(zrouter.master, - zserv_handle_client_fail, - client, 0, &client->t_cleanup); + event_add_event(zrouter.master, + zserv_handle_client_fail, + client, 0, &client->t_cleanup); } } @@ -953,16 +953,15 @@ void zserv_event(struct zserv *client, enum zserv_event event) { switch (event) { case ZSERV_ACCEPT: - thread_add_read(zrouter.master, zserv_accept, NULL, zsock, - NULL); + event_add_read(zrouter.master, zserv_accept, NULL, zsock, NULL); break; case ZSERV_PROCESS_MESSAGES: - thread_add_event(zrouter.master, zserv_process_messages, client, - 0, &client->t_process); + event_add_event(zrouter.master, zserv_process_messages, client, + 0, &client->t_process); break; case ZSERV_HANDLE_CLIENT_FAIL: - thread_add_event(zrouter.master, zserv_handle_client_fail, - client, 0, &client->t_cleanup); + event_add_event(zrouter.master, zserv_handle_client_fail, + client, 0, &client->t_cleanup); } } |