Overview
Comment: | Don't use a spinlock for reference counting if we have no threads. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
9454c38313cb4fe9363e775a7ca979b5 |
User & Date: | js on 2011-10-24 15:00:45 |
Other Links: | manifest | tags |
Context
2011-10-24
| ||
15:47 | Make sure the fullness of a hashtable is always at max 3/4. check-in: 1bec445dd2 user: js tags: trunk | |
15:00 | Don't use a spinlock for reference counting if we have no threads. check-in: 9454c38313 user: js tags: trunk | |
2011-10-22
| ||
17:06 | Fix libobjc version check. check-in: 79b09ea934 user: js tags: trunk | |
Changes
Modified src/OFObject.m from [6a6eeb3258] to [34b558d1e8].
︙ | |||
58 59 60 61 62 63 64 | 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | - + | # import "threading.h" #endif struct pre_ivar { void **memoryChunks; unsigned int memoryChunksSize; int32_t retainCount; |
︙ | |||
190 191 192 193 194 195 196 | 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | - + | @throw (OFAllocFailedException*)&alloc_failed_exception; } ((struct pre_ivar*)instance)->memoryChunks = NULL; ((struct pre_ivar*)instance)->memoryChunksSize = 0; ((struct pre_ivar*)instance)->retainCount = 1; |
︙ | |||
1007 1008 1009 1010 1011 1012 1013 | 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 | - + + + - + - + + + + | pointer: pointer]; } - retain { #if defined(OF_ATOMIC_OPS) of_atomic_inc_32(&PRE_IVAR->retainCount); |
︙ |