Updated SDL to the latest hg revision.

This commit is contained in:
Alex Szpakowski
2016-03-18 22:33:50 -03:00
parent c94ba8c02e
commit f91914c0cf
811 changed files with 4116 additions and 2164 deletions
+5 -5
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 1997-2015 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2016 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -21,7 +21,7 @@
#define NUMTHREADS 10
static char volatile time_for_threads_to_die[NUMTHREADS];
static SDL_atomic_t time_for_threads_to_die[NUMTHREADS];
/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
static void
@@ -58,7 +58,7 @@ ThreadFunc(void *data)
}
SDL_Log("Thread '%d' waiting for signal\n", tid);
while (time_for_threads_to_die[tid] != 1) {
while (SDL_AtomicGet(&time_for_threads_to_die[tid]) != 1) {
; /* do nothing */
}
@@ -92,7 +92,7 @@ main(int argc, char *argv[])
for (i = 0; i < NUMTHREADS; i++) {
char name[64];
SDL_snprintf(name, sizeof (name), "Parent%d", i);
time_for_threads_to_die[i] = 0;
SDL_AtomicSet(&time_for_threads_to_die[i], 0);
threads[i] = SDL_CreateThread(ThreadFunc, name, (void*) (uintptr_t) i);
if (threads[i] == NULL) {
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
}
for (i = 0; i < NUMTHREADS; i++) {
time_for_threads_to_die[i] = 1;
SDL_AtomicSet(&time_for_threads_to_die[i], 1);
}
for (i = 0; i < NUMTHREADS; i++) {