~ubuntu-branches/ubuntu/precise/mame/precise-proposed

« back to all changes in this revision

Viewing changes to src/osd/windows/winwork.c

  • Committer: Package Import Robot
  • Author(s): Cesare Falco
  • Date: 2011-11-30 18:50:10 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111130185010-02hcxybht1mn082w
Tags: 0.144-0ubuntu1
* New upstream release (LP: #913550)
* mame.install:
  - Added artwork/ images to be used with -effect switch
  - Be more selective with hash/ contents
* contrib/mame.ini: added /usr/share/games/mame/artwork/ to artpath

Show diffs side-by-side

added added

removed removed

Lines of Context:
279
279
}
280
280
 
281
281
 
 
282
INLINE void scalable_lock_delete(scalable_lock *lock)
 
283
{
 
284
#if USE_SCALABLE_LOCKS
 
285
#else
 
286
        DeleteCriticalSection(&lock->section);
 
287
#endif
 
288
}
 
289
 
282
290
 
283
291
//============================================================
284
292
//  osd_work_queue_alloc
487
495
        if (queue->thread != NULL)
488
496
                free(queue->thread);
489
497
 
 
498
        scalable_lock_delete(&queue->lock);
 
499
 
490
500
        // free all the events
491
501
        if (queue->doneevent != NULL)
492
502
                CloseHandle(queue->doneevent);
719
729
        // loop until we exit
720
730
        for ( ;; )
721
731
        {
722
 
                // block waiting for work or exit
723
 
                DWORD result = WAIT_OBJECT_0;
724
 
 
725
732
                // bail on exit, and only wait if there are no pending items in queue
726
733
                if (!queue->exiting && queue->list == NULL)
727
734
                {
728
735
                        begin_timing(thread->waittime);
729
 
                        result = WaitForSingleObject(thread->wakeevent, INFINITE);
 
736
                        WaitForSingleObject(thread->wakeevent, INFINITE);
730
737
                        end_timing(thread->waittime);
731
738
                }
732
739
                if (queue->exiting)