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 /bfdd | |
| 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 'bfdd')
| -rw-r--r-- | bfdd/bfd.c | 8 | ||||
| -rw-r--r-- | bfdd/bfd.h | 32 | ||||
| -rw-r--r-- | bfdd/bfd_packet.c | 2 | ||||
| -rw-r--r-- | bfdd/control.c | 10 | ||||
| -rw-r--r-- | bfdd/dplane.c | 16 | 
5 files changed, 34 insertions, 34 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c index 2586c0b99c..0ca2ca1f02 100644 --- a/bfdd/bfd.c +++ b/bfdd/bfd.c @@ -618,14 +618,14 @@ struct bfd_session *ptm_bfd_sess_find(struct bfd_pkt *cp,  	return bfd_key_lookup(key);  } -void bfd_xmt_cb(struct thread *t) +void bfd_xmt_cb(struct event *t)  {  	struct bfd_session *bs = THREAD_ARG(t);  	ptm_bfd_xmt_TO(bs, 0);  } -void bfd_echo_xmt_cb(struct thread *t) +void bfd_echo_xmt_cb(struct event *t)  {  	struct bfd_session *bs = THREAD_ARG(t); @@ -634,7 +634,7 @@ void bfd_echo_xmt_cb(struct thread *t)  }  /* Was ptm_bfd_detect_TO() */ -void bfd_recvtimer_cb(struct thread *t) +void bfd_recvtimer_cb(struct event *t)  {  	struct bfd_session *bs = THREAD_ARG(t); @@ -647,7 +647,7 @@ void bfd_recvtimer_cb(struct thread *t)  }  /* Was ptm_bfd_echo_detect_TO() */ -void bfd_echo_recvtimer_cb(struct thread *t) +void bfd_echo_recvtimer_cb(struct event *t)  {  	struct bfd_session *bs = THREAD_ARG(t); diff --git a/bfdd/bfd.h b/bfdd/bfd.h index 97e45bb2c2..59b0494aa5 100644 --- a/bfdd/bfd.h +++ b/bfdd/bfd.h @@ -265,12 +265,12 @@ struct bfd_session {  	struct bfd_config_timers timers;  	struct bfd_timers cur_timers;  	uint64_t detect_TO; -	struct thread *echo_recvtimer_ev; -	struct thread *recvtimer_ev; +	struct event *echo_recvtimer_ev; +	struct event *recvtimer_ev;  	uint64_t xmt_TO;  	uint64_t echo_xmt_TO; -	struct thread *xmttimer_ev; -	struct thread *echo_xmttimer_ev; +	struct event *xmttimer_ev; +	struct event *echo_xmttimer_ev;  	uint64_t echo_detect_TO;  	/* software object state */ @@ -401,8 +401,8 @@ struct bfd_control_socket {  	TAILQ_ENTRY(bfd_control_socket) bcs_entry;  	int bcs_sd; -	struct thread *bcs_ev; -	struct thread *bcs_outev; +	struct event *bcs_ev; +	struct event *bcs_outev;  	struct bcqueue bcs_bcqueue;  	/* Notification data */ @@ -422,7 +422,7 @@ int control_init(const char *path);  void control_shutdown(void);  int control_notify(struct bfd_session *bs, uint8_t notify_state);  int control_notify_config(const char *op, struct bfd_session *bs); -void control_accept(struct thread *t); +void control_accept(struct event *t);  /* @@ -439,7 +439,7 @@ struct bfd_vrf_global {  	int bg_echov6;  	struct vrf *vrf; -	struct thread *bg_ev[6]; +	struct event *bg_ev[6];  };  /* Forward declaration of data plane context struct. */ @@ -448,7 +448,7 @@ TAILQ_HEAD(dplane_queue, bfd_dplane_ctx);  struct bfd_global {  	int bg_csock; -	struct thread *bg_csockev; +	struct event *bg_csockev;  	struct bcslist bg_bcslist;  	struct pllist bg_pllist; @@ -466,7 +466,7 @@ struct bfd_global {  	/* Distributed BFD items. */  	bool bg_use_dplane;  	int bg_dplane_sock; -	struct thread *bg_dplane_sockev; +	struct event *bg_dplane_sockev;  	struct dplane_queue bg_dplaneq;  	/* Debug options. */ @@ -553,7 +553,7 @@ void ptm_bfd_snd(struct bfd_session *bfd, int fbit);  void ptm_bfd_echo_snd(struct bfd_session *bfd);  void ptm_bfd_echo_fp_snd(struct bfd_session *bfd); -void bfd_recv_cb(struct thread *t); +void bfd_recv_cb(struct event *t);  /* @@ -561,7 +561,7 @@ void bfd_recv_cb(struct thread *t);   *   * Contains the code related with event loop.   */ -typedef void (*bfd_ev_cb)(struct thread *t); +typedef void (*bfd_ev_cb)(struct event *t);  void bfd_recvtimer_update(struct bfd_session *bs);  void bfd_echo_recvtimer_update(struct bfd_session *bs); @@ -688,10 +688,10 @@ unsigned long bfd_get_session_count(void);  /* Export callback functions for `event.c`. */  extern struct thread_master *master; -void bfd_recvtimer_cb(struct thread *t); -void bfd_echo_recvtimer_cb(struct thread *t); -void bfd_xmt_cb(struct thread *t); -void bfd_echo_xmt_cb(struct thread *t); +void bfd_recvtimer_cb(struct event *t); +void bfd_echo_recvtimer_cb(struct event *t); +void bfd_xmt_cb(struct event *t); +void bfd_echo_xmt_cb(struct event *t);  extern struct in6_addr zero_addr; diff --git a/bfdd/bfd_packet.c b/bfdd/bfd_packet.c index 88a9310bc6..05ed2702d0 100644 --- a/bfdd/bfd_packet.c +++ b/bfdd/bfd_packet.c @@ -768,7 +768,7 @@ static void cp_debug(bool mhop, struct sockaddr_any *peer,  		   mhop ? "yes" : "no", peerstr, localstr, portstr, vrfstr);  } -void bfd_recv_cb(struct thread *t) +void bfd_recv_cb(struct event *t)  {  	int sd = THREAD_FD(t);  	struct bfd_session *bfd; diff --git a/bfdd/control.c b/bfdd/control.c index a11ed3d895..db9778a8eb 100644 --- a/bfdd/control.c +++ b/bfdd/control.c @@ -39,8 +39,8 @@ struct bfd_notify_peer *control_notifypeer_find(struct bfd_control_socket *bcs,  struct bfd_control_socket *control_new(int sd);  static void control_free(struct bfd_control_socket *bcs);  static void control_reset_buf(struct bfd_control_buffer *bcb); -static void control_read(struct thread *t); -static void control_write(struct thread *t); +static void control_read(struct event *t); +static void control_write(struct event *t);  static void control_handle_request_add(struct bfd_control_socket *bcs,  				       struct bfd_control_msg *bcm); @@ -142,7 +142,7 @@ void control_shutdown(void)  	}  } -void control_accept(struct thread *t) +void control_accept(struct event *t)  {  	int csock, sd = THREAD_FD(t); @@ -379,7 +379,7 @@ static void control_reset_buf(struct bfd_control_buffer *bcb)  	bcb->bcb_left = 0;  } -static void control_read(struct thread *t) +static void control_read(struct event *t)  {  	struct bfd_control_socket *bcs = THREAD_ARG(t);  	struct bfd_control_buffer *bcb = &bcs->bcs_bin; @@ -514,7 +514,7 @@ schedule_next_read:  	thread_add_read(master, control_read, bcs, sd, &bcs->bcs_ev);  } -static void control_write(struct thread *t) +static void control_write(struct event *t)  {  	struct bfd_control_socket *bcs = THREAD_ARG(t);  	struct bfd_control_buffer *bcb = bcs->bcs_bout; diff --git a/bfdd/dplane.c b/bfdd/dplane.c index 7d160e868a..b2c52f543f 100644 --- a/bfdd/dplane.c +++ b/bfdd/dplane.c @@ -63,11 +63,11 @@ struct bfd_dplane_ctx {  	/** Output buffer data. */  	struct stream *outbuf;  	/** Input event data. */ -	struct thread *inbufev; +	struct event *inbufev;  	/** Output event data. */ -	struct thread *outbufev; +	struct event *outbufev;  	/** Connection event. */ -	struct thread *connectev; +	struct event *connectev;  	/** Amount of bytes read. */  	uint64_t in_bytes; @@ -94,7 +94,7 @@ struct bfd_dplane_ctx {   */  typedef void (*bfd_dplane_expect_cb)(struct bfddp_message *msg, void *arg); -static void bfd_dplane_client_connect(struct thread *t); +static void bfd_dplane_client_connect(struct event *t);  static bool bfd_dplane_client_connecting(struct bfd_dplane_ctx *bdc);  static void bfd_dplane_ctx_free(struct bfd_dplane_ctx *bdc);  static int _bfd_dplane_add_session(struct bfd_dplane_ctx *bdc, @@ -312,7 +312,7 @@ static ssize_t bfd_dplane_flush(struct bfd_dplane_ctx *bdc)  	return total;  } -static void bfd_dplane_write(struct thread *t) +static void bfd_dplane_write(struct event *t)  {  	struct bfd_dplane_ctx *bdc = THREAD_ARG(t); @@ -599,7 +599,7 @@ skip_read:  	return 0;  } -static void bfd_dplane_read(struct thread *t) +static void bfd_dplane_read(struct event *t)  {  	struct bfd_dplane_ctx *bdc = THREAD_ARG(t);  	int rv; @@ -819,7 +819,7 @@ static uint16_t bfd_dplane_request_counters(const struct bfd_session *bs)  /*   * Data plane listening socket.   */ -static void bfd_dplane_accept(struct thread *t) +static void bfd_dplane_accept(struct event *t)  {  	struct bfd_global *bg = THREAD_ARG(t);  	struct bfd_dplane_ctx *bdc; @@ -899,7 +899,7 @@ static bool bfd_dplane_client_connecting(struct bfd_dplane_ctx *bdc)  	}  } -static void bfd_dplane_client_connect(struct thread *t) +static void bfd_dplane_client_connect(struct event *t)  {  	struct bfd_dplane_ctx *bdc = THREAD_ARG(t);  	int rv, sock;  | 
