]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/kern/host.h
xnu-3789.51.2.tar.gz
[apple/xnu.git] / osfmk / kern / host.h
index 8381a868bc25d06c66e0e3043db804b5f936b55d..59458f00cc2b846b3888aba15c4e189d19cad02a 100644 (file)
 
 #ifdef MACH_KERNEL_PRIVATE
 
-#include <kern/lock.h>
+#include <kern/locks.h>
 #include <kern/exception.h>
 #include <mach/exception_types.h>
 #include <mach/host_special_ports.h>
 #include <kern/kern_types.h>
-
+#include <mach/vm_statistics.h>
 
 struct host {
-       decl_mutex_data(,lock)          /* lock to protect exceptions */
+       decl_lck_mtx_data(,lock)                /* lock to protect exceptions */
        ipc_port_t special[HOST_MAX_SPECIAL_PORT + 1];
        struct exception_action exc_actions[EXC_TYPES_COUNT];
 };
@@ -86,8 +86,21 @@ typedef struct host  host_data_t;
 
 extern host_data_t     realhost;
 
-#define host_lock(host)                mutex_lock(&(host)->lock)
-#define host_unlock(host)      mutex_unlock(&(host)->lock)
+#define host_lock(host)                lck_mtx_lock(&(host)->lock)
+#define host_unlock(host)      lck_mtx_unlock(&(host)->lock)
+
+extern vm_extmod_statistics_data_t host_extmod_statistics;
+
+typedef struct {
+       uint64_t total_user_time;
+       uint64_t total_system_time;
+       uint64_t task_interrupt_wakeups;
+       uint64_t task_platform_idle_wakeups;
+       uint64_t task_timer_wakeups_bin_1;
+       uint64_t task_timer_wakeups_bin_2;
+} expired_task_statistics_t;
+
+extern expired_task_statistics_t dead_task_statistics;
 
 #endif /* MACH_KERNEL_PRIVATE */