diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-04-10 12:19:13 +1000 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2013-04-10 10:49:20 -0700 |
commit | 37428306a270088bfcb1f94362a0fe5b7a5a888e (patch) | |
tree | 5d1aeca3eca44b68a8f8939e3bea44709a953aa9 /ui/twin/pbt-scr.h | |
parent | ee86a0bd989511319adf3467b41b5b2e1f486aa6 (diff) | |
download | talos-petitboot-37428306a270088bfcb1f94362a0fe5b7a5a888e.tar.gz talos-petitboot-37428306a270088bfcb1f94362a0fe5b7a5a888e.zip |
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 <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'ui/twin/pbt-scr.h')
-rw-r--r-- | ui/twin/pbt-scr.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/twin/pbt-scr.h b/ui/twin/pbt-scr.h index c075aad..1198a59 100644 --- a/ui/twin/pbt-scr.h +++ b/ui/twin/pbt-scr.h @@ -18,6 +18,8 @@ #if !defined(_PBT_SCR_H) #define _PBT_SCR_H +#include <waiter/waiter.h> + #include <libtwin/twin.h> #include <libtwin/twin_jpeg.h> #include <libtwin/twin_linux_mouse.h> @@ -137,7 +139,8 @@ struct pbt_scr { twin_pixmap_t *cursor; }; -struct pbt_scr *pbt_scr_init(void *talloc_ctx, enum pbt_twin_backend backend, +struct pbt_scr *pbt_scr_init(void *talloc_ctx, struct waitset *waitset, + enum pbt_twin_backend backend, unsigned int width, unsigned int height, const char *filename_background, twin_bool_t (*scr_event_cb)(twin_screen_t *tscreen, @@ -171,4 +174,4 @@ void pbt_window_redraw(twin_window_t *twindow); _p->height) -#endif
\ No newline at end of file +#endif |