@@ -29,11 +29,11 @@ #endif OF_ASSUME_NONNULL_BEGIN static OF_INLINE int -of_atomic_int_add(volatile __nonnull int *p, int i) +of_atomic_int_add(volatile int *OF_NONNULL p, int i) { #if !defined(OF_HAVE_THREADS) return (*p += i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_add_and_fetch(p, i); @@ -78,11 +78,11 @@ # error of_atomic_int_add not implemented! #endif } static OF_INLINE int32_t -of_atomic_int32_add(volatile __nonnull int32_t *p, int32_t i) +of_atomic_int32_add(volatile int32_t *OF_NONNULL p, int32_t i) { #if !defined(OF_HAVE_THREADS) return (*p += i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_add_and_fetch(p, i); @@ -114,11 +114,11 @@ # error of_atomic_int32_add not implemented! #endif } static OF_INLINE void* -of_atomic_ptr_add(__nullable void *volatile *__nonnull p, intptr_t i) +of_atomic_ptr_add(void *volatile OF_NULLABLE *OF_NONNULL p, intptr_t i) { #if !defined(OF_HAVE_THREADS) return (*(char* volatile*)p += i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_add_and_fetch(p, (void*)i); @@ -164,11 +164,11 @@ # error of_atomic_ptr_add not implemented! #endif } static OF_INLINE int -of_atomic_int_sub(volatile __nonnull int *p, int i) +of_atomic_int_sub(volatile int *OF_NONNULL p, int i) { #if !defined(OF_HAVE_THREADS) return (*p -= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_sub_and_fetch(p, i); @@ -215,11 +215,11 @@ # error of_atomic_int_sub not implemented! #endif } static OF_INLINE int32_t -of_atomic_int32_sub(volatile __nonnull int32_t *p, int32_t i) +of_atomic_int32_sub(volatile int32_t *OF_NONNULL p, int32_t i) { #if !defined(OF_HAVE_THREADS) return (*p -= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_sub_and_fetch(p, i); @@ -252,11 +252,11 @@ # error of_atomic_int32_sub not implemented! #endif } static OF_INLINE void* -of_atomic_ptr_sub(__nullable void *volatile *__nonnull p, intptr_t i) +of_atomic_ptr_sub(void *volatile OF_NULLABLE *OF_NONNULL p, intptr_t i) { #if !defined(OF_HAVE_THREADS) return (*(char* volatile*)p -= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_sub_and_fetch(p, (void*)i); @@ -304,11 +304,11 @@ # error of_atomic_ptr_sub not implemented! #endif } static OF_INLINE int -of_atomic_int_inc(volatile __nonnull int *p) +of_atomic_int_inc(volatile int *OF_NONNULL p) { #if !defined(OF_HAVE_THREADS) return ++*p; #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_add_and_fetch(p, 1); @@ -361,11 +361,11 @@ # error of_atomic_int_inc not implemented! #endif } static OF_INLINE int32_t -of_atomic_int32_inc(volatile __nonnull int32_t *p) +of_atomic_int32_inc(volatile int32_t *OF_NONNULL p) { #if !defined(OF_HAVE_THREADS) return ++*p; #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_add_and_fetch(p, 1); @@ -403,11 +403,11 @@ # error of_atomic_int32_inc not implemented! #endif } static OF_INLINE int -of_atomic_int_dec(volatile __nonnull int *p) +of_atomic_int_dec(volatile int *OF_NONNULL p) { #if !defined(OF_HAVE_THREADS) return --*p; #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_sub_and_fetch(p, 1); @@ -460,11 +460,11 @@ # error of_atomic_int_dec not implemented! #endif } static OF_INLINE int32_t -of_atomic_int32_dec(volatile __nonnull int32_t *p) +of_atomic_int32_dec(volatile int32_t *OF_NONNULL p) { #if !defined(OF_HAVE_THREADS) return --*p; #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_sub_and_fetch(p, 1); @@ -502,11 +502,11 @@ # error of_atomic_int32_dec not implemented! #endif } static OF_INLINE unsigned int -of_atomic_int_or(volatile __nonnull unsigned int *p, unsigned int i) +of_atomic_int_or(volatile unsigned int *OF_NONNULL p, unsigned int i) { #if !defined(OF_HAVE_THREADS) return (*p |= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_or_and_fetch(p, i); @@ -561,11 +561,11 @@ # error of_atomic_int_or not implemented! #endif } static OF_INLINE uint32_t -of_atomic_int32_or(volatile __nonnull uint32_t *p, uint32_t i) +of_atomic_int32_or(volatile uint32_t *OF_NONNULL p, uint32_t i) { #if !defined(OF_HAVE_THREADS) return (*p |= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_or_and_fetch(p, i); @@ -602,11 +602,11 @@ # error of_atomic_int32_or not implemented! #endif } static OF_INLINE unsigned int -of_atomic_int_and(volatile __nonnull unsigned int *p, unsigned int i) +of_atomic_int_and(volatile unsigned int *OF_NONNULL p, unsigned int i) { #if !defined(OF_HAVE_THREADS) return (*p &= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_and_and_fetch(p, i); @@ -661,11 +661,11 @@ # error of_atomic_int_and not implemented! #endif } static OF_INLINE uint32_t -of_atomic_int32_and(volatile __nonnull uint32_t *p, uint32_t i) +of_atomic_int32_and(volatile uint32_t *OF_NONNULL p, uint32_t i) { #if !defined(OF_HAVE_THREADS) return (*p &= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_and_and_fetch(p, i); @@ -702,11 +702,11 @@ # error of_atomic_int32_and not implemented! #endif } static OF_INLINE unsigned int -of_atomic_int_xor(volatile __nonnull unsigned int *p, unsigned int i) +of_atomic_int_xor(volatile unsigned int *OF_NONNULL p, unsigned int i) { #if !defined(OF_HAVE_THREADS) return (*p ^= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_xor_and_fetch(p, i); @@ -761,11 +761,11 @@ # error of_atomic_int_xor not implemented! #endif } static OF_INLINE uint32_t -of_atomic_int32_xor(volatile __nonnull uint32_t *p, uint32_t i) +of_atomic_int32_xor(volatile uint32_t *OF_NONNULL p, uint32_t i) { #if !defined(OF_HAVE_THREADS) return (*p ^= i); #elif defined(OF_HAVE_GCC_ATOMIC_OPS) return __sync_xor_and_fetch(p, i); @@ -802,11 +802,11 @@ # error of_atomic_int32_xor not implemented! #endif } static OF_INLINE bool -of_atomic_int_cmpswap(volatile __nonnull int *p, int o, int n) +of_atomic_int_cmpswap(volatile int *OF_NONNULL p, int o, int n) { #if !defined(OF_HAVE_THREADS) if (*p == o) { *p = n; return true; @@ -857,11 +857,11 @@ # error of_atomic_int_cmpswap not implemented! #endif } static OF_INLINE bool -of_atomic_int32_cmpswap(volatile __nonnull int32_t *p, int32_t o, int32_t n) +of_atomic_int32_cmpswap(volatile int32_t *OF_NONNULL p, int32_t o, int32_t n) { #if !defined(OF_HAVE_THREADS) if (*p == o) { *p = n; return true; @@ -912,12 +912,12 @@ # error of_atomic_int32_cmpswap not implemented! #endif } static OF_INLINE bool -of_atomic_ptr_cmpswap(__nullable void *volatile *__nonnull p, - __nullable void *o, __nullable void *n) +of_atomic_ptr_cmpswap(void *volatile OF_NULLABLE *OF_NONNULL p, + void *OF_NULLABLE o, void *OF_NULLABLE n) { #if !defined(OF_HAVE_THREADS) if (*p == o) { *p = n; return true;