Changeset 6e313dd in buchla-emu for emu/cpu.c


Ignore:
Timestamp:
08/01/2017 11:11:47 PM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
08471db
Parents:
bdd5a63
Message:

Be friendlier to Valgrind.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • emu/cpu.c

    rbdd5a63 r6e313dd  
    656656{
    657657        inf("entering CPU loop");
     658        int32_t count = 0;
    658659
    659660        while (SDL_AtomicGet(&run) != 0) {
     
    677678                }
    678679
     680                if ((++count & 0x1ff) == 0) {
     681                        SDL_Delay(0);
     682                }
     683
    679684                while (SDL_GetPerformanceCounter() < until) {
    680                         _mm_pause();
     685                        for (int32_t i = 0; i < 100; ++i) {
     686                                _mm_pause();
     687                        }
    681688                }
    682689        }
Note: See TracChangeset for help on using the changeset viewer.