Differences From Artifact [ec5df4b0c7]:
- File
src/runtime/property.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: 3304) [annotate] [blame] [check-ins using]
To Artifact [79dd5a258d]:
- File src/runtime/property.m — part of check-in [d07c56a8bb] at 2017-04-02 01:06:35 on branch trunk — Add OF_CONSTRUCTOR() / OF_DESTRUCTOR() (user: js, size: 3265) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
27 28 29 30 31 32 33 | # import "threading.h" # define NUM_SPINLOCKS 8 /* needs to be a power of 2 */ # define SPINLOCK_HASH(p) ((unsigned)((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1)) static of_spinlock_t spinlocks[NUM_SPINLOCKS]; #endif #ifdef OF_HAVE_THREADS | | < | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | # import "threading.h" # define NUM_SPINLOCKS 8 /* needs to be a power of 2 */ # define SPINLOCK_HASH(p) ((unsigned)((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1)) static of_spinlock_t spinlocks[NUM_SPINLOCKS]; #endif #ifdef OF_HAVE_THREADS OF_CONSTRUCTOR() { for (size_t i = 0; i < NUM_SPINLOCKS; i++) if (!of_spinlock_new(&spinlocks[i])) OBJC_ERROR("Failed to initialize spinlocks!") } #endif |
︙ | ︙ |