trunk/src/osd/sdl/sdlwork.c
| r242650 | r242651 | |
| 690 | 690 | begin_timing(thread->runtime); |
| 691 | 691 | |
| 692 | 692 | // loop until everything is processed |
| 693 | | while (queue->list != NULL) |
| 693 | while (true) |
| 694 | 694 | { |
| 695 | 695 | osd_work_item *item; |
| 696 | | INT32 lockslot; |
| 697 | 696 | |
| 698 | 697 | // use a critical section to synchronize the removal of items |
| 699 | | lockslot = osd_scalable_lock_acquire(queue->lock); |
| 698 | INT32 lockslot = osd_scalable_lock_acquire(queue->lock); |
| 700 | 699 | { |
| 700 | if (queue->list == NULL) |
| 701 | { |
| 702 | osd_scalable_lock_release(queue->lock, lockslot); |
| 703 | break; |
| 704 | } |
| 705 | |
| 706 | |
| 701 | 707 | // pull the item from the queue |
| 702 | 708 | item = (osd_work_item *)queue->list; |
| 703 | 709 | if (item != NULL) |
trunk/src/osd/windows/winwork.c
| r242650 | r242651 | |
| 681 | 681 | begin_timing(thread->runtime); |
| 682 | 682 | |
| 683 | 683 | // loop until everything is processed |
| 684 | | while (queue->list != NULL) |
| 684 | while (true) |
| 685 | 685 | { |
| 686 | 686 | osd_work_item *item; |
| 687 | | INT32 lockslot; |
| 688 | 687 | |
| 689 | 688 | // use a critical section to synchronize the removal of items |
| 690 | | lockslot = osd_scalable_lock_acquire(queue->lock); |
| 689 | INT32 lockslot = osd_scalable_lock_acquire(queue->lock); |
| 691 | 690 | { |
| 691 | if (queue->list == NULL) |
| 692 | { |
| 693 | osd_scalable_lock_release(queue->lock, lockslot); |
| 694 | break; |
| 695 | } |
| 696 | |
| 697 | |
| 692 | 698 | // pull the item from the queue |
| 693 | 699 | item = (osd_work_item *)queue->list; |
| 694 | 700 | if (item != NULL) |