src/atomic/SDL_spinlock.c
author Ryan C. Gordon <icculus@icculus.org>
Thu, 09 Apr 2015 22:33:39 -0400
branchiOS-improvements
changeset 9542 618662dc9e82
parent 8991 13b0df1793e8
child 9619 b94b6d0bff0f
permissions -rw-r--r--
Closing the iOS-improvements branch.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     1
/*
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     2
  Simple DirectMedia Layer
8149
681eb46b8ac4 Fixed bug 2374 - Update copyright for 2014...
Sam Lantinga <slouken@libsdl.org>
parents: 8093
diff changeset
     3
  Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     4
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     5
  This software is provided 'as-is', without any express or implied
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     6
  warranty.  In no event will the authors be held liable for any damages
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     7
  arising from the use of this software.
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     8
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
     9
  Permission is granted to anyone to use this software for any purpose,
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    10
  including commercial applications, and to alter it and redistribute it
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    11
  freely, subject to the following restrictions:
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    12
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    13
  1. The origin of this software must not be misrepresented; you must not
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    14
     claim that you wrote the original software. If you use this software
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    15
     in a product, an acknowledgment in the product documentation would be
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    16
     appreciated but is not required.
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    17
  2. Altered source versions must be plainly marked as such, and must not be
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    18
     misrepresented as being the original software.
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    19
  3. This notice may not be removed or altered from any source distribution.
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    20
*/
8093
b43765095a6f Make internal SDL sources include SDL_internal.h instead of SDL_config.h
Ryan C. Gordon <icculus@icculus.org>
parents: 7828
diff changeset
    21
#include "../SDL_internal.h"
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    22
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    23
#if defined(__WIN32__) || defined(__WINRT__)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    24
#include "../core/windows/SDL_windows.h"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    25
#endif
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    26
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    27
#include "SDL_atomic.h"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    28
#include "SDL_mutex.h"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    29
#include "SDL_timer.h"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    30
8979
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    31
#if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    32
#include <atomic.h>
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    33
#endif
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    34
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    35
/* This function is where all the magic happens... */
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    36
SDL_bool
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    37
SDL_AtomicTryLock(SDL_SpinLock *lock)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    38
{
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    39
#if SDL_ATOMIC_DISABLED
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    40
    /* Terrible terrible damage */
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    41
    static SDL_mutex *_spinlock_mutex;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    42
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    43
    if (!_spinlock_mutex) {
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    44
        /* Race condition on first lock... */
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    45
        _spinlock_mutex = SDL_CreateMutex();
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    46
    }
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    47
    SDL_LockMutex(_spinlock_mutex);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    48
    if (*lock == 0) {
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    49
        *lock = 1;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    50
        SDL_UnlockMutex(_spinlock_mutex);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    51
        return SDL_TRUE;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    52
    } else {
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    53
        SDL_UnlockMutex(_spinlock_mutex);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    54
        return SDL_FALSE;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    55
    }
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    56
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    57
#elif defined(_MSC_VER)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    58
    SDL_COMPILE_TIME_ASSERT(locksize, sizeof(*lock) == sizeof(long));
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    59
    return (InterlockedExchange((long*)lock, 1) == 0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    60
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    61
#elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    62
    return (__sync_lock_test_and_set(lock, 1) == 0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    63
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    64
#elif defined(__GNUC__) && defined(__arm__) && \
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    65
        (defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    66
         defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    67
         defined(__ARM_ARCH_5TEJ__))
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    68
    int result;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    69
    __asm__ __volatile__ (
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    70
        "swp %0, %1, [%2]\n"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    71
        : "=&r,&r" (result) : "r,0" (1), "r,r" (lock) : "memory");
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    72
    return (result == 0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    73
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    74
#elif defined(__GNUC__) && defined(__arm__)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    75
    int result;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    76
    __asm__ __volatile__ (
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    77
        "ldrex %0, [%2]\nteq   %0, #0\nstrexeq %0, %1, [%2]"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    78
        : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory");
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    79
    return (result == 0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    80
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    81
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    82
    int result;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    83
    __asm__ __volatile__(
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    84
        "lock ; xchgl %0, (%1)\n"
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    85
        : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory");
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    86
    return (result == 0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    87
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    88
#elif defined(__MACOSX__) || defined(__IPHONEOS__)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    89
    /* Maybe used for PowerPC, but the Intel asm or gcc atomics are favored. */
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    90
    return OSAtomicCompareAndSwap32Barrier(0, 1, lock);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
    91
8979
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    92
#elif defined(__SOLARIS__) && defined(_LP64)
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    93
    /* Used for Solaris with non-gcc compilers. */
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    94
    return (SDL_bool) ((int) atomic_cas_64((volatile uint64_t*)lock, 0, 1) == 0);
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    95
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    96
#elif defined(__SOLARIS__) && !defined(_LP64)
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    97
    /* Used for Solaris with non-gcc compilers. */
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    98
    return (SDL_bool) ((int) atomic_cas_32((volatile uint32_t*)lock, 0, 1) == 0);
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
    99
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   100
#else
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   101
#error Please implement for your platform.
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   102
    return SDL_FALSE;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   103
#endif
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   104
}
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   105
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   106
void
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   107
SDL_AtomicLock(SDL_SpinLock *lock)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   108
{
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   109
    /* FIXME: Should we have an eventual timeout? */
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   110
    while (!SDL_AtomicTryLock(lock)) {
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   111
        SDL_Delay(0);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   112
    }
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   113
}
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   114
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   115
void
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   116
SDL_AtomicUnlock(SDL_SpinLock *lock)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   117
{
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   118
#if defined(_MSC_VER)
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   119
    _ReadWriteBarrier();
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   120
    *lock = 0;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   121
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   122
#elif HAVE_GCC_ATOMICS || HAVE_GCC_SYNC_LOCK_TEST_AND_SET
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   123
    __sync_lock_release(lock);
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   124
8979
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
   125
#elif defined(__SOLARIS__)
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
   126
    /* Used for Solaris when not using gcc. */
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
   127
    *lock = 0;
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
   128
    membar_producer();
1e283b7a1580 2620 solaris port missing atomics if not using gcc
Shawn Walker <binarycrusader@gmail.com>
parents: 8583
diff changeset
   129
8582
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   130
#else
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   131
    *lock = 0;
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   132
#endif
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   133
}
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   134
c3e9a2b93517 Fixed line endings on WinRT source code
Sam Lantinga <slouken@libsdl.org>
parents: 8536
diff changeset
   135
/* vi: set ts=4 sw=4 expandtab: */