diff options
author | Sam Lantinga <slouken@libsdl.org> | 2013-07-10 18:31:17 -0700 |
---|---|---|
committer | Sam Lantinga <slouken@libsdl.org> | 2013-07-10 18:31:17 -0700 |
commit | 6299813616ed57c571aac60c53fd91213db70e61 (patch) | |
tree | db9c9dd24ee408168e689a91845c843022452a75 /test/testthread.c | |
parent | 7d98907d26cf88fcc338048b1c87a4862754b8eb (diff) | |
download | sdl-6299813616ed57c571aac60c53fd91213db70e61.tar.gz |
Added release/acquire memory barriers to the atomic API
* Added a destructor to clean up TLS memory at thread shutdown
* Refactored the TLS code to have platform independent code and a small platform dependent core with a fallback to generic code if platform dependent functions fail.
* Fixed recursion issues with SDL_GetErrBuf()
Diffstat (limited to 'test/testthread.c')
-rw-r--r-- | test/testthread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/testthread.c b/test/testthread.c index b8f18dc06..47c1b57f0 100644 --- a/test/testthread.c +++ b/test/testthread.c @@ -33,7 +33,7 @@ quit(int rc) int SDLCALL ThreadFunc(void *data) { - SDL_TLSSet(tls, "baby thread"); + SDL_TLSSet(tls, "baby thread", NULL); printf("Started thread %s: My thread id is %lu, thread data = %s\n", (char *) data, SDL_ThreadID(), (const char *)SDL_TLSGet(tls)); while (alive) { @@ -66,7 +66,7 @@ main(int argc, char *argv[]) tls = SDL_TLSCreate(); SDL_assert(tls); - SDL_TLSSet(tls, "main thread"); + SDL_TLSSet(tls, "main thread", NULL); printf("Main thread data initially: %s\n", (const char *)SDL_TLSGet(tls)); alive = 1; |