Overview
Comment: | Fix type of the new *_ptr atomic ops. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
8ae37b5b5f9702e6d6a67c317b88cd56 |
User & Date: | js on 2010-11-08 19:24:26 |
Other Links: | manifest | tags |
Context
2010-11-08
| ||
19:38 | Rename run-on-iphone to run-on-ios and rename respective variables. check-in: 7312b92a1d user: js tags: trunk | |
19:24 | Fix type of the new *_ptr atomic ops. check-in: 8ae37b5b5f user: js tags: trunk | |
2010-11-06
| ||
13:36 | Correctly use FD_COPY. check-in: 1fceb27c0e user: js tags: trunk | |
Changes
Modified src/atomic.h from [0a81676089] to [9f0732f9a3].
︙ | ︙ | |||
70 71 72 73 74 75 76 | return __sync_add_and_fetch(p, i); #elif defined(OF_HAVE_OSATOMIC) return OSAtomicAdd32Barrier(i, p); #endif } static OF_INLINE void* | | | 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | return __sync_add_and_fetch(p, i); #elif defined(OF_HAVE_OSATOMIC) return OSAtomicAdd32Barrier(i, p); #endif } static OF_INLINE void* of_atomic_add_ptr(void* volatile *p, intptr_t i) { #if !defined(OF_THREADS) return (*p += i); #elif defined(OF_X86_ASM) || defined(OF_AMD64_ASM) __asm__ ( "lock\n\t" "xaddl %0, %2\n\t" |
︙ | ︙ | |||
152 153 154 155 156 157 158 | return __sync_sub_and_fetch(p, i); #elif defined(OF_HAVE_OSATOMIC) return OSAtomicAdd32Barrier(-i, p); #endif } static OF_INLINE void* | | | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | return __sync_sub_and_fetch(p, i); #elif defined(OF_HAVE_OSATOMIC) return OSAtomicAdd32Barrier(-i, p); #endif } static OF_INLINE void* of_atomic_sub_ptr(void* volatile *p, intptr_t i) { #if !defined(OF_THREADS) return (*p -= i); #elif defined(OF_X86_ASM) || defined(OF_AMD64_ASM) __asm__ ( "negl %0\n\t" "lock\n\t" |
︙ | ︙ |