summaryrefslogtreecommitdiff
path: root/src/til_fb.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-08-13 23:16:20 -0700
committerVito Caputo <vcaputo@pengaru.com>2023-08-13 23:16:20 -0700
commitcf4b27c90534fe2c7842f96c1553eaace1e81190 (patch)
tree3d7d2f7481f88cae32c6c854646f5e89d6d039a1 /src/til_fb.h
parenta41d4e72dc915a8cb79aa8f1f2177def06d75844 (diff)
til_fb: introduce til_fb_halt()
This makes it so til_fb_page_get() will return NULL when the fb has been "halted". If til_fb_page_get() is already waiting for a page to become available, it will be woken up by til_fb_halt(). Preparatory commit for eliminating the reliance on pthread_cancel() to terminate rototiller_thread() on shutdown. Cancellation is always a PITA, especially cross-platform, but in general it's so easy to have subtle bugs when using it.
Diffstat (limited to 'src/til_fb.h')
-rw-r--r--src/til_fb.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/til_fb.h b/src/til_fb.h
index 1f100dd..5ad210f 100644
--- a/src/til_fb.h
+++ b/src/til_fb.h
@@ -55,6 +55,7 @@ til_fb_t * til_fb_free(til_fb_t *fb);
void til_fb_get_put_pages_count(til_fb_t *fb, unsigned *count);
int til_fb_new(const til_fb_ops_t *ops, const char *title, const til_setup_t *setup, int n_pages, til_fb_t **res_fb);
void til_fb_rebuild(til_fb_t *fb);
+void til_fb_halt(til_fb_t *fb);
void * til_fb_context(til_fb_t *fb);
int til_fb_flip(til_fb_t *fb);
void til_fb_fragment_divide(til_fb_fragment_t *fragment, unsigned n_fragments, til_fb_fragment_t fragments[]);
© All Rights Reserved