18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include "config.h"
#include <string.h>
#import "ObjFWRT.h"
#import "private.h"
#import "OFObject.h"
#ifdef OF_HAVE_THREADS
# import "mutex.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
|
<
<
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "config.h"
#include <string.h>
#import "ObjFWRT.h"
#import "private.h"
#ifdef OF_HAVE_THREADS
# import "mutex.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
|