Overview
| Comment: | Use spinlocks in objc_properties.m. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
2be191ec575779c705b30d8a49e75888 |
| User & Date: | js on 2010-01-25 22:40:58 |
| Other Links: | manifest | tags |
Context
|
2010-01-29
| ||
| 15:21 | Make retain count int32_t. (check-in: b725e983ae user: js tags: trunk) | |
|
2010-01-25
| ||
| 22:40 | Use spinlocks in objc_properties.m. (check-in: 2be191ec57 user: js tags: trunk) | |
| 22:39 | Add of_atomic_cmpswap32 and spinlocks to atomic.h. (check-in: 212482d8c6 user: js tags: trunk) | |
Changes
Modified src/objc_properties.m from [14cd33968d] to [684035ffa6].
| ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | + + + + + + - - - + + + + + + + + + - + + + + + + + + - |
#include "config.h"
#import <objc/objc.h>
#import "OFExceptions.h"
#import "atomic.h"
#define NUM_SPINLOCKS 8 /* needs to be a power of 2 */
#define SPINLOCK_HASH(p) ((uintptr_t)p >> 4) & (NUM_SPINLOCKS - 1)
static of_spinlock_t spinlocks[NUM_SPINLOCKS] = {};
id
objc_getProperty(id self, SEL _cmd, ptrdiff_t offset, BOOL atomic)
{
if (atomic) {
|
| ︙ |