Differences From Artifact [3ce1164040]:
- File
src/threading.h
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 6552) [annotate] [blame] [check-ins using]
To Artifact [2fb0666be8]:
- File src/threading.h — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 6550) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
200 201 202 203 204 205 206 | } static OF_INLINE bool of_spinlock_lock(of_spinlock_t *spinlock) { #if defined(OF_HAVE_ATOMIC_OPS) # if defined(OF_HAVE_SCHED_YIELD) || defined(OF_WINDOWS) | < < | | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | } static OF_INLINE bool of_spinlock_lock(of_spinlock_t *spinlock) { #if defined(OF_HAVE_ATOMIC_OPS) # if defined(OF_HAVE_SCHED_YIELD) || defined(OF_WINDOWS) for (size_t i = 0; i < OF_SPINCOUNT; i++) if (of_spinlock_trylock(spinlock)) return true; while (!of_spinlock_trylock(spinlock)) # ifndef OF_WINDOWS sched_yield(); # else |
︙ | ︙ |