The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/man/task_info.man

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 .\" 
    2 .\" Mach Operating System
    3 .\" Copyright (c) 1991,1990 Carnegie Mellon University
    4 .\" All Rights Reserved.
    5 .\" 
    6 .\" Permission to use, copy, modify and distribute this software and its
    7 .\" documentation is hereby granted, provided that both the copyright
    8 .\" notice and this permission notice appear in all copies of the
    9 .\" software, derivative works or modified versions, and any portions
   10 .\" thereof, and that both notices appear in supporting documentation.
   11 .\" 
   12 .\" CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
   13 .\" CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
   14 .\" ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
   15 .\" 
   16 .\" Carnegie Mellon requests users of this software to return to
   17 .\" 
   18 .\"  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
   19 .\"  School of Computer Science
   20 .\"  Carnegie Mellon University
   21 .\"  Pittsburgh PA 15213-3890
   22 .\" 
   23 .\" any improvements or extensions that they make and grant Carnegie Mellon
   24 .\" the rights to redistribute these changes.
   25 .\" 
   26 .\" 
   27 .\" HISTORY
   28 .\" $Log:       task_info.man,v $
   29 .\" Revision 2.5  93/03/18  15:14:50  mrt
   30 .\"     corrected types
   31 .\"     [93/03/12  16:52:49  lli]
   32 .\" 
   33 .\" Revision 2.4  91/05/14  17:12:36  mrt
   34 .\"     Correcting copyright
   35 .\" 
   36 .\" Revision 2.3  91/02/14  14:14:34  mrt
   37 .\"     Changed to new Mach copyright
   38 .\"     [91/02/12  18:15:24  mrt]
   39 .\" 
   40 .\" Revision 2.2  90/08/07  18:43:37  rpd
   41 .\"     Created.
   42 .\" 
   43 .TH task_info 2 1/20/88
   44 .CM 4
   45 .SH NAME
   46 .nf
   47 task_info  \-  gets task machine independent information
   48 .SH SYNOPSIS
   49 .nf
   50 .ft B
   51 #include <mach.h>
   52 
   53 /* the definition of task_info_t from mach.h - mach/task_info.h is */
   54 
   55 typedef int     *task_info_t;           /* variable length array of int */
   56 
   57 /* currently the only interpretation of info is */
   58 
   59    struct task_basic_info {
   60         int             suspend_count;  /* suspend count for task */
   61         int             base_priority;  /* base scheduling priority */
   62         vm_size_t       virtual_size;   /* number of virtual pages */
   63         vm_size_t       resident_size;  /* number of resident pages */
   64         time_value_t    user_time;      /* total user run time for
   65                                            terminated threads */
   66         time_value_t    system_time;    /* total system run time for
   67                                            terminated threads */
   68    };
   69 typedef struct task_basic_info          *task_basic_info_t;
   70 
   71 .nf
   72 .ft B
   73 kern_return_t task_info(target_task, flavor, task_info, task_infoCnt)
   74         mach_port_t     target_task;
   75         int             flavor;
   76         task_info_t     task_info;      /* in and out */
   77         mach_msg_type_number_t  *task_infoCnt;  /* in and out */
   78 
   79 
   80 .fi
   81 .ft P
   82 .SH ARGUMENTS
   83 .TP 15
   84 .B
   85 target_task
   86 The task to be affected.
   87 .TP 15
   88 .B
   89 flavor
   90 The type of statistics that are wanted.  Currently only
   91 .B TASK_BASIC_INFO
   92 is implemented.
   93 .TP 15
   94 .B
   95 task_info
   96 Statistics about the task specified by 
   97 .B target_task
   98 .
   99 .TP 15
  100 .B
  101 task_infoCnt
  102 Size of the info structure. Currently only 
  103 .B TASK_BASIC_INFO_COUNT
  104 is  implemented.
  105 
  106 .SH DESCRIPTION
  107 
  108 Returns the selected information array for a task, as specified
  109 by 
  110 .B flavor
  111 . 
  112 .B task_info
  113 is an array of integers that is supplied
  114 by the caller, and filled with specified information. 
  115 .B task_infoCnt
  116 is supplied as the maximum number of integers in 
  117 .B task_info
  118 . On return,
  119 it contains the actual number of integers in 
  120 .B task_info
  121 .
  122 
  123 Currently there is only one flavor of information which is defined
  124 by 
  125 .B TASK_BASIC_INFO
  126 . Its size is defined by 
  127 .B TASK_BASIC_INFO_COUNT
  128 .
  129 
  130 
  131 .SH DIAGNOSTICS
  132 .TP 25
  133 KERN_SUCCESS
  134 The call succeeded.
  135 .TP 25
  136 KERN_INVALID_ARGUMENT
  137 .B target_task
  138 is not a task or
  139 .B flavor
  140 is not recognized.
  141 .TP 25
  142 MIG_ARRAY_TOO_LARGE
  143 Returned info array is too large for
  144 .B task_info
  145 . 
  146 .B task_info
  147 is filled as much as possible.
  148 .B task_infoCnt
  149 is set to the number of elements that would
  150 be returned if there were enough room.
  151 
  152 .SH SEE ALSO
  153 .B task_special_ports, task_threads,
  154 .B thread_info, thread_state
  155 
  156 
  157 
  158 

Cache object: b72bc48e943346dd51f5d8c7600858fe


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.