238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
#endif
}
static OF_INLINE BOOL
of_spinlock_unlock(of_spinlock_t *s)
{
#if defined(OF_ATOMIC_OPS)
*s = 0;
return YES;
#elif defined(OF_HAVE_PTHREAD_SPINLOCKS)
return (pthread_spin_unlock(s) ? NO : YES);
#else
return of_mutex_unlock(s);
#endif
}
|
|
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
#endif
}
static OF_INLINE BOOL
of_spinlock_unlock(of_spinlock_t *s)
{
#if defined(OF_ATOMIC_OPS)
of_atomic_and32((uint32_t*)s, 0);
return YES;
#elif defined(OF_HAVE_PTHREAD_SPINLOCKS)
return (pthread_spin_unlock(s) ? NO : YES);
#else
return of_mutex_unlock(s);
#endif
}
|