diff options
| author | 2015-12-28 11:27:47 +0100 | |
|---|---|---|
| committer | 2015-12-28 11:27:47 +0100 | |
| commit | 2a5e044fc23624a388bdb5f82ef9c11cbed6a9c7 (patch) | |
| tree | b468f54cdcbb7252d14790a7a013b138b1bd9b03 /src/osd/modules/sync/sync_ntc.cpp | |
| parent | 077fe7ad89d65bbeafde141c9b3f71ca8df42f1c (diff) | |
| parent | 11fcbaa28583023ea93a8f0c1f3fb9082d3295ab (diff) | |
Merge https://github.com/mamedev/mame
# Conflicts:
# src/devices/video/ef9365.cpp
Diffstat (limited to 'src/osd/modules/sync/sync_ntc.cpp')
| -rw-r--r-- | src/osd/modules/sync/sync_ntc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/osd/modules/sync/sync_ntc.cpp b/src/osd/modules/sync/sync_ntc.cpp index 2575089c9d1..462c56ee434 100644 --- a/src/osd/modules/sync/sync_ntc.cpp +++ b/src/osd/modules/sync/sync_ntc.cpp @@ -177,7 +177,7 @@ void osd_scalable_lock_free(osd_scalable_lock *lock) free(lock); } -INLINE pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange) +static inline pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread_t compare, pthread_t exchange) { #ifdef PTR64 INT64 result = compare_exchange64((INT64 volatile *)ptr, (INT64)compare, (INT64)exchange); @@ -187,7 +187,7 @@ INLINE pthread_t osd_compare_exchange_pthread_t(pthread_t volatile *ptr, pthread return (pthread_t)result; } -INLINE pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange) +static inline pthread_t osd_exchange_pthread_t(pthread_t volatile *ptr, pthread_t exchange) { #ifdef PTR64 INT64 result = osd_exchange64((INT64 volatile *)ptr, (INT64)exchange); @@ -226,7 +226,7 @@ void osd_lock_acquire(osd_lock *lock) current = pthread_self(); prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev != (size_t)NULL && prev != current) + if (prev != nullptr && prev != current) { do { register INT32 spin = 10000; // Convenient spin count @@ -281,7 +281,7 @@ void osd_lock_acquire(osd_lock *lock) nanosleep(&sleep, &remaining); // sleep for 100us } #endif - } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != (size_t)NULL); + } while (osd_compare_exchange_pthread_t(&lock->holder, 0, current) != nullptr); } lock->count++; } @@ -296,7 +296,7 @@ int osd_lock_try(osd_lock *lock) current = pthread_self(); prev = osd_compare_exchange_pthread_t(&lock->holder, 0, current); - if (prev == (size_t)NULL || prev == current) + if (prev == nullptr || prev == current) { lock->count++; return 1; |
