diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2015-08-04 16:05:38 +0100 |
---|---|---|
committer | Christophe Fergeau <cfergeau@redhat.com> | 2015-12-11 18:56:54 +0100 |
commit | aa09f04717a7c29c29dd302717816b3a8eda3168 (patch) | |
tree | 3cfd15ca769454593aeac59bec5db8d754bceabc | |
parent | 2862f0820d4d2c3257d98f48505743d171cf4bc0 (diff) |
dcc: do not cause problem with multiple threads.
With multiple cards configured you can have multiple workers running in
different thread.
With such configuration static variables not syncronized could lead
to undefined behavior.
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
-rw-r--r-- | server/red_worker.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 57ba5a91..1309592c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -7171,9 +7171,8 @@ static void red_pipe_replace_rendered_drawables_with_images(RedWorker *worker, int first_surface_id, SpiceRect *first_area) { - /* TODO: can't have those statics with multiple clients */ - static int resent_surface_ids[MAX_PIPE_SIZE]; - static SpiceRect resent_areas[MAX_PIPE_SIZE]; // not pointers since drawbales may be released + int resent_surface_ids[MAX_PIPE_SIZE]; + SpiceRect resent_areas[MAX_PIPE_SIZE]; // not pointers since drawables may be released int num_resent; PipeItem *pipe_item; Ring *pipe; |