X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/e2d2fc5c71f7d145cba7267989251af45e3bb5ba..5ba3f43ea354af8ad55bea84372a2bc834d8757c:/libsyscall/wrappers/remove-counter.c diff --git a/libsyscall/wrappers/remove-counter.c b/libsyscall/wrappers/remove-counter.c index fe41f2757..f1757a654 100644 --- a/libsyscall/wrappers/remove-counter.c +++ b/libsyscall/wrappers/remove-counter.c @@ -22,6 +22,9 @@ */ #include +#if defined(__arm__) +#include +#endif #if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) static int64_t __remove_counter = 0; @@ -31,11 +34,19 @@ static int32_t __remove_counter = 0; __uint64_t __get_remove_counter(void) { +#if defined(__arm__) && !defined(_ARM_ARCH_6) + return __remove_counter; +#else return __sync_add_and_fetch(&__remove_counter, 0); +#endif } void __inc_remove_counter(void) { +#if defined(__arm__) && !defined(_ARM_ARCH_6) + __remove_counter++; +#else __sync_add_and_fetch(&__remove_counter, 1); +#endif }