diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2021-02-18 03:16:21 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2021-02-18 03:36:51 -0800 |
commit | 6661cb3d0cbbc170b385d1ff66f525aac899df6a (patch) | |
tree | cfb7e0bcbccf4025b484c3dfe283079b9e46446c /src | |
parent | 0536326f814739a4ee6136f4156431e77fe45769 (diff) |
fb: remember the page count in fb_t
Adds fb_t.n_pages member, we need the number of pages for queueing
rebuilds.
Diffstat (limited to 'src')
-rw-r--r-- | src/fb.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -65,6 +65,7 @@ struct _fb_page_t { typedef struct fb_t { const fb_ops_t *ops; void *ops_context; + int n_pages; _fb_page_t *active_page; /* page currently displayed */ @@ -318,6 +319,8 @@ int fb_new(const fb_ops_t *ops, settings_t *settings, int n_pages, fb_t **res_fb for (int i = 0; i < n_pages; i++) fb_page_new(fb); + fb->n_pages = n_pages; + pthread_mutex_init(&fb->ready_mutex, NULL); pthread_cond_init(&fb->ready_cond, NULL); pthread_mutex_init(&fb->inactive_mutex, NULL); |