@@ -133,6 +133,25 @@ typedef int boolean_t;
133
133
#include <sys/stat.h> // mode_t
134
134
#endif
135
135
136
+ #if TARGET_OS_LINUX || TARGET_OS_BSD
137
+ // Implemented in CFPlatform.c
138
+ bool OSAtomicCompareAndSwapPtr (void * oldp , void * newp , void * volatile * dst );
139
+ bool OSAtomicCompareAndSwapLong (long oldl , long newl , long volatile * dst );
140
+ bool OSAtomicCompareAndSwapPtrBarrier (void * oldp , void * newp , void * volatile * dst );
141
+ bool OSAtomicCompareAndSwap64Barrier ( int64_t __oldValue , int64_t __newValue , volatile int64_t * __theValue );
142
+
143
+ int32_t OSAtomicDecrement32Barrier (volatile int32_t * dst );
144
+ int32_t OSAtomicIncrement32Barrier (volatile int32_t * dst );
145
+ int32_t OSAtomicIncrement32 (volatile int32_t * theValue );
146
+ int32_t OSAtomicDecrement32 (volatile int32_t * theValue );
147
+
148
+ int32_t OSAtomicAdd32 ( int32_t theAmount , volatile int32_t * theValue );
149
+ int32_t OSAtomicAdd32Barrier ( int32_t theAmount , volatile int32_t * theValue );
150
+ bool OSAtomicCompareAndSwap32Barrier ( int32_t oldValue , int32_t newValue , volatile int32_t * theValue );
151
+
152
+ void OSMemoryBarrier ();
153
+ #endif // TARGET_OS_LINUX || TARGET_OS_BSD
154
+
136
155
#if TARGET_OS_LINUX
137
156
138
157
#define CF_PRIVATE extern __attribute__((visibility("hidden")))
@@ -183,23 +202,6 @@ strlcat(char * dst, const char * src, size_t maxlen) {
183
202
#if !TARGET_OS_CYGWIN && !TARGET_OS_BSD
184
203
#define issetugid () 0
185
204
#endif
186
-
187
- // Implemented in CFPlatform.c
188
- bool OSAtomicCompareAndSwapPtr (void * oldp , void * newp , void * volatile * dst );
189
- bool OSAtomicCompareAndSwapLong (long oldl , long newl , long volatile * dst );
190
- bool OSAtomicCompareAndSwapPtrBarrier (void * oldp , void * newp , void * volatile * dst );
191
- bool OSAtomicCompareAndSwap64Barrier ( int64_t __oldValue , int64_t __newValue , volatile int64_t * __theValue );
192
-
193
- int32_t OSAtomicDecrement32Barrier (volatile int32_t * dst );
194
- int32_t OSAtomicIncrement32Barrier (volatile int32_t * dst );
195
- int32_t OSAtomicIncrement32 (volatile int32_t * theValue );
196
- int32_t OSAtomicDecrement32 (volatile int32_t * theValue );
197
-
198
- int32_t OSAtomicAdd32 ( int32_t theAmount , volatile int32_t * theValue );
199
- int32_t OSAtomicAdd32Barrier ( int32_t theAmount , volatile int32_t * theValue );
200
- bool OSAtomicCompareAndSwap32Barrier ( int32_t oldValue , int32_t newValue , volatile int32_t * theValue );
201
-
202
- void OSMemoryBarrier ();
203
205
204
206
#if TARGET_OS_CYGWIN
205
207
#define HAVE_STRUCT_TIMESPEC 1
@@ -230,24 +232,6 @@ CF_INLINE uint64_t mach_absolute_time() {
230
232
#define CF_PRIVATE extern __attribute__((visibility("hidden")))
231
233
#define __strong
232
234
#define __weak
233
-
234
- // Implemented in CFPlatform.c
235
- bool OSAtomicCompareAndSwapPtr (void * oldp , void * newp , void * volatile * dst );
236
- bool OSAtomicCompareAndSwapLong (long oldl , long newl , long volatile * dst );
237
- bool OSAtomicCompareAndSwapPtrBarrier (void * oldp , void * newp , void * volatile * dst );
238
- bool OSAtomicCompareAndSwap64Barrier ( int64_t __oldValue , int64_t __newValue , volatile int64_t * __theValue );
239
-
240
- int32_t OSAtomicDecrement32Barrier (volatile int32_t * dst );
241
- int32_t OSAtomicIncrement32Barrier (volatile int32_t * dst );
242
- int32_t OSAtomicIncrement32 (volatile int32_t * theValue );
243
- int32_t OSAtomicDecrement32 (volatile int32_t * theValue );
244
-
245
- int32_t OSAtomicAdd32 ( int32_t theAmount , volatile int32_t * theValue );
246
- int32_t OSAtomicAdd32Barrier ( int32_t theAmount , volatile int32_t * theValue );
247
- bool OSAtomicCompareAndSwap32Barrier ( int32_t oldValue , int32_t newValue , volatile int32_t * theValue );
248
-
249
- void OSMemoryBarrier ();
250
-
251
235
#endif
252
236
253
237
#if TARGET_OS_LINUX || TARGET_OS_BSD
0 commit comments