]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/sys/bsdtask_info.h
xnu-3789.41.3.tar.gz
[apple/xnu.git] / bsd / sys / bsdtask_info.h
index 0da659b821ba6c8f1d72dc85f62e869fe3ce74cd..c6df6786c8ca0f6b06d2e643d7e98717018dcac4 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
 
 /*
- * Copyright (c) 2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2005, 2015 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -30,6 +30,8 @@
 #ifndef _SYS_BSDTASK_INFO_H
 #define _SYS_BSDTASK_INFO_H
 
 #ifndef _SYS_BSDTASK_INFO_H
 #define _SYS_BSDTASK_INFO_H
 
+#include <vm/vm_map.h>
+
 struct proc_taskinfo_internal {          
         uint64_t                pti_virtual_size;   /* virtual memory size (bytes) */
         uint64_t                pti_resident_size;  /* resident memory size (bytes) */
 struct proc_taskinfo_internal {          
         uint64_t                pti_virtual_size;   /* virtual memory size (bytes) */
         uint64_t                pti_resident_size;  /* resident memory size (bytes) */
@@ -51,6 +53,7 @@ struct proc_taskinfo_internal {
        int32_t                 pti_priority;           /* task priority*/
 };
 
        int32_t                 pti_priority;           /* task priority*/
 };
 
+#define MAXTHREADNAMESIZE 64
 
 struct proc_threadinfo_internal {
        uint64_t                pth_user_time;      /* user run time */
 
 struct proc_threadinfo_internal {
        uint64_t                pth_user_time;      /* user run time */
@@ -63,7 +66,7 @@ struct proc_threadinfo_internal {
        int32_t                 pth_curpri;             /* cur priority*/
        int32_t                 pth_priority;           /*  priority*/
        int32_t                 pth_maxpriority;                /* max priority*/
        int32_t                 pth_curpri;             /* cur priority*/
        int32_t                 pth_priority;           /*  priority*/
        int32_t                 pth_maxpriority;                /* max priority*/
-       char *                  pth_name[64];           /* thread name, if any */
+       char                    pth_name[MAXTHREADNAMESIZE];            /* thread name, if any */
 };
 
 
 };
 
 
@@ -99,17 +102,26 @@ struct proc_regioninfo_internal {
 
 void  vm_map_region_top_walk(vm_map_entry_t entry, vm_region_top_info_t top);
 void vm_map_region_walk(vm_map_t map, vm_map_offset_t a, vm_map_entry_t entry, vm_object_offset_t offset, vm_object_size_t range, vm_region_extended_info_t extended);
 
 void  vm_map_region_top_walk(vm_map_entry_t entry, vm_region_top_info_t top);
 void vm_map_region_walk(vm_map_t map, vm_map_offset_t a, vm_map_entry_t entry, vm_object_offset_t offset, vm_object_size_t range, vm_region_extended_info_t extended);
-kern_return_t vnode_pager_get_object_vnode(memory_object_t mem_obj,uint32_t * vnodeaddr, uint32_t * vid);
+kern_return_t vnode_pager_get_object_vnode(memory_object_t mem_obj, uintptr_t * vnodeaddr, uint32_t * vid);
 extern uint32_t vnode_vid(void *vp);
 extern uint32_t vnode_vid(void *vp);
+#if CONFIG_IOSCHED
+kern_return_t vnode_pager_get_object_devvp(memory_object_t mem_obj, uintptr_t *devvp);
+extern struct vnode *vnode_mountdevvp(struct vnode *);
+#endif
 
 #endif /* MACH_KERNEL_PRIVATE */
 
 
 #endif /* MACH_KERNEL_PRIVATE */
 
-extern int fill_procregioninfo(task_t t, uint64_t arg, struct proc_regioninfo_internal *pinfo, uint32_t *vp, uint32_t *vid);
+extern int fill_procregioninfo(task_t t, uint64_t arg, struct proc_regioninfo_internal *pinfo, uintptr_t *vp, uint32_t *vid);
+extern int fill_procregioninfo_onlymappedvnodes(task_t t, uint64_t arg, struct proc_regioninfo_internal *pinfo, uintptr_t *vp, uint32_t *vid);
 void fill_taskprocinfo(task_t task, struct proc_taskinfo_internal * ptinfo);
 void fill_taskprocinfo(task_t task, struct proc_taskinfo_internal * ptinfo);
-int fill_taskthreadinfo(task_t task, uint64_t thaddr, struct proc_threadinfo_internal * ptinfo, void *, int *);
+int fill_taskthreadinfo(task_t task, uint64_t thaddr, int thuniqueid, struct proc_threadinfo_internal * ptinfo, void *, int *);
 int fill_taskthreadlist(task_t task, void * buffer, int thcount);
 int get_numthreads(task_t);
 int fill_taskthreadlist(task_t task, void * buffer, int thcount);
 int get_numthreads(task_t);
+boolean_t bsd_hasthreadname(void *uth);
+void bsd_getthreadname(void *uth, char* buffer);
+void bsd_setthreadname(void *uth, const char* buffer);
 void bsd_threadcdir(void * uth, void *vptr, int *vidp);
 void bsd_threadcdir(void * uth, void *vptr, int *vidp);
+extern void bsd_copythreadname(void *dst_uth, void *src_uth);
 
 #endif /*_SYS_BSDTASK_INFO_H */
 
 
 #endif /*_SYS_BSDTASK_INFO_H */