Differences From Artifact [493fa84215]:
- File
src/threading.m
— part of check-in
[44f45c2e35]
at
2017-01-09 17:36:36
on branch trunk
— Update copyright
Forgot to add 2017, even though I already did quite some changes in
2017. (user: js, size: 2599) [annotate] [blame] [check-ins using]
To Artifact [df2361523e]:
- File src/threading.m — part of check-in [48ffea9a9a] at 2017-04-13 13:19:02 on branch trunk — Clean up memory barriers (user: js, size: 2594) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
29 30 31 32 33 34 35 | #ifndef OF_HAVE_PTHREADS void of_once(of_once_t *control, void (*func)(void)) { if (of_atomic_int_cmpswap(control, 0, 1)) { func(); | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifndef OF_HAVE_PTHREADS void of_once(of_once_t *control, void (*func)(void)) { if (of_atomic_int_cmpswap(control, 0, 1)) { func(); of_memory_barrier(); of_atomic_int_inc(control); } else while (*control == 1) of_thread_yield(); } #endif |
︙ | ︙ |