X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/8f6c56a50524aa785f7e596d52dddfb331e18961..c7d2c2c6ee645e10cbccdd01c6191873ec77239d:/osfmk/kern/host_statistics.h diff --git a/osfmk/kern/host_statistics.h b/osfmk/kern/host_statistics.h index c391806d1..c67af697e 100644 --- a/osfmk/kern/host_statistics.h +++ b/osfmk/kern/host_statistics.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. + * Copyright (c) 2000-2009 Apple Inc. All rights reserved. * * @APPLE_OSREFERENCE_LICENSE_HEADER_START@ * @@ -38,14 +38,19 @@ #ifndef _KERN_HOST_STATISTICS_H_ #define _KERN_HOST_STATISTICS_H_ +#include #include #include -#define VM_STAT(event) \ -MACRO_BEGIN \ - disable_preemption(); \ - PROCESSOR_DATA(current_processor(), vm_stat).event; \ - enable_preemption(); \ + +#define VM_STAT_INCR(event) \ +MACRO_BEGIN \ + OSAddAtomic64(1, (SInt64 *) (&(PROCESSOR_DATA(current_processor(), vm_stat).event))); \ +MACRO_END + +#define VM_STAT_INCR_BY(event, amount) \ +MACRO_BEGIN \ + OSAddAtomic64((amount), (SInt64 *) (&(PROCESSOR_DATA(current_processor(), vm_stat).event))); \ MACRO_END #endif /* _KERN_HOST_STATISTICS_H_ */