diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-03-01 16:18:12 -0500 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-03-24 08:32:17 -0400 | 
| commit | e6685141aae8fc869d49cde1d459f73b87bbec89 (patch) | |
| tree | 465539dece789430eaaf76bce18c754c5e18f452 /lib/agentx.c | |
| parent | cb37cb336a2cca77bfbaf6b0cfab12e847e45623 (diff) | |
*: Rename `struct thread` to `struct event`
Effectively a massive search and replace of
`struct thread` to `struct event`.  Using the
term `thread` gives people the thought that
this event system is a pthread when it is not
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'lib/agentx.c')
| -rw-r--r-- | lib/agentx.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/agentx.c b/lib/agentx.c index 2f45ae8332..a17ee17253 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -28,12 +28,12 @@ DEFINE_HOOK(agentx_enabled, (), ());  static bool agentx_enabled = false;  static struct thread_master *agentx_tm; -static struct thread *timeout_thr = NULL; +static struct event *timeout_thr = NULL;  static struct list *events = NULL;  static void agentx_events_update(void); -static void agentx_timeout(struct thread *t) +static void agentx_timeout(struct event *t)  {  	snmp_timeout();  	run_alarms(); @@ -41,13 +41,13 @@ static void agentx_timeout(struct thread *t)  	agentx_events_update();  } -static void agentx_read(struct thread *t) +static void agentx_read(struct event *t)  {  	fd_set fds;  	int flags, new_flags = 0;  	int nonblock = false;  	struct listnode *ln = THREAD_ARG(t); -	struct thread **thr = listgetdata(ln); +	struct event **thr = listgetdata(ln);  	XFREE(MTYPE_TMP, thr);  	list_delete_node(events, ln); @@ -94,7 +94,7 @@ static void agentx_events_update(void)  	struct timeval timeout = {.tv_sec = 0, .tv_usec = 0};  	fd_set fds;  	struct listnode *ln; -	struct thread **thr; +	struct event **thr;  	int fd, thr_fd;  	thread_cancel(&timeout_thr); @@ -130,8 +130,8 @@ static void agentx_events_update(void)  		/* need listener, but haven't hit one where it would be */  		else if (FD_ISSET(fd, &fds)) {  			struct listnode *newln; -			thr = XCALLOC(MTYPE_TMP, sizeof(struct thread *)); +			thr = XCALLOC(MTYPE_TMP, sizeof(struct event *));  			newln = listnode_add_before(events, ln, thr);  			thread_add_read(agentx_tm, agentx_read, newln, fd, thr);  		}  | 
