summaryrefslogtreecommitdiff
path: root/ldpd/accept.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@nvidia.com>2022-03-01 16:18:12 -0500
committerDonald Sharp <sharpd@nvidia.com>2023-03-24 08:32:17 -0400
commite6685141aae8fc869d49cde1d459f73b87bbec89 (patch)
tree465539dece789430eaaf76bce18c754c5e18f452 /ldpd/accept.c
parentcb37cb336a2cca77bfbaf6b0cfab12e847e45623 (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 'ldpd/accept.c')
-rw-r--r--ldpd/accept.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/ldpd/accept.c b/ldpd/accept.c
index 170c079b52..6151c1a0b6 100644
--- a/ldpd/accept.c
+++ b/ldpd/accept.c
@@ -13,21 +13,21 @@
struct accept_ev {
LIST_ENTRY(accept_ev) entry;
- struct thread *ev;
- void (*accept_cb)(struct thread *);
+ struct event *ev;
+ void (*accept_cb)(struct event *);
void *arg;
int fd;
};
struct {
LIST_HEAD(, accept_ev) queue;
- struct thread *evt;
+ struct event *evt;
} accept_queue;
static void accept_arm(void);
static void accept_unarm(void);
-static void accept_cb(struct thread *);
-static void accept_timeout(struct thread *);
+static void accept_cb(struct event *);
+static void accept_timeout(struct event *);
void
accept_init(void)
@@ -35,7 +35,7 @@ accept_init(void)
LIST_INIT(&accept_queue.queue);
}
-int accept_add(int fd, void (*cb)(struct thread *), void *arg)
+int accept_add(int fd, void (*cb)(struct event *), void *arg)
{
struct accept_ev *av;
@@ -103,14 +103,14 @@ accept_unarm(void)
THREAD_OFF(av->ev);
}
-static void accept_cb(struct thread *thread)
+static void accept_cb(struct event *thread)
{
struct accept_ev *av = THREAD_ARG(thread);
thread_add_read(master, accept_cb, av, av->fd, &av->ev);
av->accept_cb(thread);
}
-static void accept_timeout(struct thread *thread)
+static void accept_timeout(struct event *thread)
{
accept_queue.evt = NULL;