diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2019-11-23 16:59:59 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2019-11-23 17:04:45 -0800 |
commit | 6bfd66051632fdb8eca4103df2c3c67492d28af7 (patch) | |
tree | a921e41d24cb1d6a52a158baddf586273b675032 /src/threads.h | |
parent | ade362b53d721bc2e2c7a62a30c4345014e5f5ce (diff) |
rototiller: pass cpu to .render_fragment()
Mostly mechanical change, though threads.c needed some jiggering to
make the logical cpu id available to the worker threads.
Now render_fragment() can easily addresss per-cpu data created by
create_context().
Diffstat (limited to 'src/threads.h')
-rw-r--r-- | src/threads.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/threads.h b/src/threads.h index ea78c25..7080537 100644 --- a/src/threads.h +++ b/src/threads.h @@ -3,13 +3,12 @@ typedef struct fb_fragment_t fb_fragment_t; typedef struct rototiller_frame_t rototiller_frame_t; -typedef struct thread_t thread_t; typedef struct threads_t threads_t; threads_t * threads_create(); void threads_destroy(threads_t *threads); -void threads_frame_submit(threads_t *threads, fb_fragment_t *fragment, rototiller_fragmenter_t fragmenter, void (*render_fragment_func)(void *context, fb_fragment_t *fragment), void *context); +void threads_frame_submit(threads_t *threads, fb_fragment_t *fragment, rototiller_fragmenter_t fragmenter, void (*render_fragment_func)(void *context, unsigned cpu, fb_fragment_t *fragment), void *context); void threads_wait_idle(threads_t *threads); unsigned threads_num_threads(threads_t *threads); |