]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/host_statistics.h
xnu-2050.22.13.tar.gz
[apple/xnu.git] / osfmk / kern / host_statistics.h
index c391806d1ff34a04811625203b156ed96d0beaf8..efe59d74e58c6bd50e4399045a65be9c1bb51557 100644 (file)
@@ -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@
  * 
 #ifndef        _KERN_HOST_STATISTICS_H_
 #define _KERN_HOST_STATISTICS_H_
 
+#include <libkern/OSAtomic.h>
 #include <mach/vm_statistics.h>
 #include <kern/processor.h>
 
-#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
 
 #endif /* _KERN_HOST_STATISTICS_H_ */