Previous 199869 Revisions Next

r34124 Wednesday 31st December, 2014 at 09:50:59 UTC by Oliver Stöneberg
fixed another ThreadSanitizer data race warning (nw)
[src/osd/sdl]sdlwork.c
[src/osd/windows]winwork.c

trunk/src/osd/sdl/sdlwork.c
r242635r242636
9797   volatile INT32      items;          // items in the queue
9898   volatile INT32      livethreads;    // number of live threads
9999   volatile INT32      waiting;        // is someone waiting on the queue to complete?
100   volatile UINT8      exiting;        // should the threads exit on their next opportunity?
100   volatile INT32      exiting;        // should the threads exit on their next opportunity?
101101   UINT32              threads;        // number of threads in this queue
102102   UINT32              flags;          // creation flags
103103   work_thread_info *  thread;         // array of thread information
r242635r242636
313313      end_timing(queue->thread[queue->threads].waittime);
314314
315315      // signal all the threads to exit
316      queue->exiting = TRUE;
316      atomic_exchange32(&queue->exiting, TRUE);
317317      for (threadnum = 0; threadnum < queue->threads; threadnum++)
318318      {
319319         work_thread_info *thread = &queue->thread[threadnum];
r242635r242636
504504   if (item->event == NULL)
505505      item->event = osd_event_alloc(TRUE, FALSE);     // manual reset, not signalled
506506   else
507         osd_event_reset(item->event);
507      osd_event_reset(item->event);
508508
509509   // if we don't have an event, we need to spin (shouldn't ever really happen)
510510   if (item->event == NULL)
trunk/src/osd/windows/winwork.c
r242635r242636
109109   volatile INT32      items;          // items in the queue
110110   volatile INT32      livethreads;    // number of live threads
111111   volatile INT32      waiting;        // is someone waiting on the queue to complete?
112   volatile UINT8      exiting;        // should the threads exit on their next opportunity?
112   volatile INT32      exiting;        // should the threads exit on their next opportunity?
113113   UINT32              threads;        // number of threads in this queue
114114   UINT32              flags;          // creation flags
115115   work_thread_info *  thread;         // array of thread information
r242635r242636
323323      end_timing(queue->thread[queue->threads].waittime);
324324
325325      // signal all the threads to exit
326      queue->exiting = TRUE;
326      atomic_exchange32(&queue->exiting, TRUE);
327327      for (threadnum = 0; threadnum < queue->threads; threadnum++)
328328      {
329329         work_thread_info *thread = &queue->thread[threadnum];


Previous 199869 Revisions Next


© 1997-2024 The MAME Team