summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-08-04 16:05:38 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2015-12-11 18:56:54 +0100
commitaa09f04717a7c29c29dd302717816b3a8eda3168 (patch)
tree3cfd15ca769454593aeac59bec5db8d754bceabc
parent2862f0820d4d2c3257d98f48505743d171cf4bc0 (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.c5
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;