trunk/src/osd/sdl/sdlwork.c
| r242635 | r242636 | |
| 97 | 97 | volatile INT32 items; // items in the queue |
| 98 | 98 | volatile INT32 livethreads; // number of live threads |
| 99 | 99 | 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? |
| 101 | 101 | UINT32 threads; // number of threads in this queue |
| 102 | 102 | UINT32 flags; // creation flags |
| 103 | 103 | work_thread_info * thread; // array of thread information |
| r242635 | r242636 | |
| 313 | 313 | end_timing(queue->thread[queue->threads].waittime); |
| 314 | 314 | |
| 315 | 315 | // signal all the threads to exit |
| 316 | | queue->exiting = TRUE; |
| 316 | atomic_exchange32(&queue->exiting, TRUE); |
| 317 | 317 | for (threadnum = 0; threadnum < queue->threads; threadnum++) |
| 318 | 318 | { |
| 319 | 319 | work_thread_info *thread = &queue->thread[threadnum]; |
| r242635 | r242636 | |
| 504 | 504 | if (item->event == NULL) |
| 505 | 505 | item->event = osd_event_alloc(TRUE, FALSE); // manual reset, not signalled |
| 506 | 506 | else |
| 507 | | osd_event_reset(item->event); |
| 507 | osd_event_reset(item->event); |
| 508 | 508 | |
| 509 | 509 | // if we don't have an event, we need to spin (shouldn't ever really happen) |
| 510 | 510 | if (item->event == NULL) |
trunk/src/osd/windows/winwork.c
| r242635 | r242636 | |
| 109 | 109 | volatile INT32 items; // items in the queue |
| 110 | 110 | volatile INT32 livethreads; // number of live threads |
| 111 | 111 | 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? |
| 113 | 113 | UINT32 threads; // number of threads in this queue |
| 114 | 114 | UINT32 flags; // creation flags |
| 115 | 115 | work_thread_info * thread; // array of thread information |
| r242635 | r242636 | |
| 323 | 323 | end_timing(queue->thread[queue->threads].waittime); |
| 324 | 324 | |
| 325 | 325 | // signal all the threads to exit |
| 326 | | queue->exiting = TRUE; |
| 326 | atomic_exchange32(&queue->exiting, TRUE); |
| 327 | 327 | for (threadnum = 0; threadnum < queue->threads; threadnum++) |
| 328 | 328 | { |
| 329 | 329 | work_thread_info *thread = &queue->thread[threadnum]; |