diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2023-08-13 23:21:42 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2023-08-13 23:21:42 -0700 |
commit | 8d55a9c9512465096f9ecaa4096baa379c6c8bfa (patch) | |
tree | 0feb1980bc92c488f9b10087041d992ab2d192cc | |
parent | cf4b27c90534fe2c7842f96c1553eaace1e81190 (diff) |
main: switch to til_fb_halt()
This gets rid of the rototiller_thread() pthread_cancel() based
exit which seemed to rarely make clang's ASAN
(-fsanitize=address) very angry with a segfault in libc somewhere
Instead of trying to chase that down I'm just getting rid of it,
it's unnecessary.
-rw-r--r-- | src/main.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -334,10 +334,15 @@ static void * rototiller_thread(void *_rt) rototiller_t *rt = _rt; struct timeval now; - for (;;) { - unsigned ticks; + while (til_stream_active(rt->stream)) { + unsigned ticks; rt->fragment = til_fb_page_get(rt->fb); + if (!rt->fragment) { + til_stream_end(rt->stream); + continue; + } + gettimeofday(&now, NULL); ticks = get_ticks(&rt->start_tv, &now, rt->ticks_offset); til_module_render(rt->module_context, rt->stream, ticks, &rt->fragment); @@ -425,7 +430,7 @@ int main(int argc, const char *argv[]) fps_fprint(rototiller.fb, stderr); } - pthread_cancel(rototiller.thread); + til_fb_halt(rototiller.fb); pthread_join(rototiller.thread, NULL); til_quiesce(); |