Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c
source/src/thread/SDL_thread.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 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
@@ -205,6 +205,11 @@
SDL_error *
SDL_GetErrBuf(void)
{
#if SDL_THREADS_DISABLED
    /* Non-thread-safe global error variable */
    static SDL_error SDL_global_error;
    return &SDL_global_error;
#else
    static SDL_SpinLock tls_lock;
    static SDL_bool tls_being_created;
    static SDL_TLSID tls_errbuf;
@@ -249,6 +254,7 @@
        SDL_TLSSet(tls_errbuf, errbuf, SDL_free);
    }
    return errbuf;
#endif /* SDL_THREADS_DISABLED */
}