path: root/discover/udev.c
diff options
authorJeremy Kerr <>2013-04-10 12:19:13 +1000
committerGeoff Levand <>2013-04-10 10:49:20 -0700
commit37428306a270088bfcb1f94362a0fe5b7a5a888e (patch)
tree5d1aeca3eca44b68a8f8939e3bea44709a953aa9 /discover/udev.c
parentee86a0bd989511319adf3467b41b5b2e1f486aa6 (diff)
waiter: Don't rely on global variables to keep waiter state
Rather than defining the set of waiters (and pollfds) in waiter.c, add a struct waitset to contain these. A waitset is created with waitset_create, which is passed to the waiter_* functions. Signed-off-by: Jeremy Kerr <> Signed-off-by: Geoff Levand <>
Diffstat (limited to 'discover/udev.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/discover/udev.c b/discover/udev.c
index 28357c7..40b9f63 100644
--- a/discover/udev.c
+++ b/discover/udev.c
@@ -116,7 +116,7 @@ static int udev_destructor(void *p)
return 0;
-struct udev *udev_init(struct device_handler *handler)
+struct udev *udev_init(struct waitset *waitset, struct device_handler *handler)
struct sockaddr_un addr;
struct udev *udev;
@@ -144,7 +144,7 @@ struct udev *udev_init(struct device_handler *handler)
goto out_err;
- waiter_register(udev->socket, WAIT_IN, udev_process, udev);
+ waiter_register(waitset, udev->socket, WAIT_IN, udev_process, udev);
pb_log("%s: waiting on %s\n", __func__, PBOOT_DEVICE_SOCKET);
OpenPOWER on IntegriCloud