src/thread/windows/SDL_sysmutex.c
changeset 9930 84285c1d8ca4
parent 9619 b94b6d0bff0f
child 9998 f67cf37e9cd4
equal deleted inserted replaced
9929:500c15a73ede 9930:84285c1d8ca4
    43     /* Allocate mutex memory */
    43     /* Allocate mutex memory */
    44     mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex));
    44     mutex = (SDL_mutex *) SDL_malloc(sizeof(*mutex));
    45     if (mutex) {
    45     if (mutex) {
    46         /* Initialize */
    46         /* Initialize */
    47         /* On SMP systems, a non-zero spin count generally helps performance */
    47         /* On SMP systems, a non-zero spin count generally helps performance */
       
    48 #if __WINRT__
       
    49         InitializeCriticalSectionEx(&mutex->cs, 2000, 0);
       
    50 #else
    48         InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000);
    51         InitializeCriticalSectionAndSpinCount(&mutex->cs, 2000);
       
    52 #endif
    49     } else {
    53     } else {
    50         SDL_OutOfMemory();
    54         SDL_OutOfMemory();
    51     }
    55     }
    52     return (mutex);
    56     return (mutex);
    53 }
    57 }