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/thread_set_policy_param.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) 1993 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:       thread_set_policy_param.man,v $
   29 .\" Revision 2.2  93/12/07  14:00:14  dbg
   30 .\"     Created.
   31 .\" 
   32 .\" 
   33 .TH thread_set_policy_param 2 9/22/93
   34 .CM 4
   35 .SH NAME
   36 .nf
   37 thread_set_policy_param  \-  set scheduling parameters for thread
   38 thread_set_policy_limit  \-  set max scheduling parameters for thread
   39 .SH SYNOPSIS
   40 .nf
   41 .ft B
   42 #include <mach.h>
   43 
   44 .nf
   45 .ft B
   46 kern_return_t thread_set_policy_param(
   47         thread_t        thread,
   48         boolean_t       set_limit,
   49         policy_param_t  param,
   50         natural_t       param_count);
   51 
   52 
   53 .fi
   54 .ft P
   55 .nf
   56 .ft B
   57 kern_return_t thread_set_policy_limit(
   58         thread_t        thread,
   59         processor_set_t processor_set,
   60         policy_param_t  limit,
   61         natural_t       limit_count);
   62 
   63 
   64 .fi
   65 .ft P
   66 .SH ARGUMENTS
   67 .TP 15
   68 .B
   69 thread
   70 The thread whose scheduling parameters are to be changed.
   71 .TP 15
   72 .B
   73 param[param_count]
   74 The new priority to change it to.
   75 .TP 15
   76 .B
   77 set_limit
   78 Also set thread's scheduling policy limits if TRUE.
   79 .TP 15
   80 .B
   81 processor_set
   82 The control port for the processor set to which the 
   83 thread is currently assigned.
   84 
   85 .SH DESCRIPTION
   86 A thread has two sets of policy parameters associated with it by
   87 the system: its
   88 .B current
   89 policy parameters (for example, the base priority for a timesharing
   90 thread), and its policy
   91 .B limit
   92 parameters (for example, the maximum priority).
   93 The current policy parameters are used to make scheduling decisions
   94 about the thread.  For example, the current policy parameter is the
   95 base priority of a timesharing thread.  The policy parameters may
   96 be set under user control, but may never exceed the policy limit
   97 parameters.
   98 Changing the policy limit requires presentation of the control port
   99 for the thread's processor set; since the control port for the default
  100 processor set is privileged, users cannot raise their limits (for example,
  101 their maximum timesharing priority)
  102 to unfairly compete with other users on that set.  Newly created threads
  103 obtain their scheduling policy and parameters from their task,
  104 and their policy limits from their assigned processor set.
  105 
  106 .B thread_set_policy_param
  107 changes the current policy parameters, and optionally the
  108 policy limits, of
  109 .B thread.
  110 The policy parameters vary depending on the policy; see
  111 .B thread_set_policy
  112 for the parameters for each policy.
  113 The policy limit values of the thread are also set if 
  114 .B set_limit
  115 is TRUE.  This call will fail if 
  116 .B param
  117 specifies values that exceed the policy limits of the thread.  As
  118 a result, this call can only lower the policy parameters of
  119 the thread.
  120 
  121 .B thread_set_policy_limit
  122 changes the policy limit values of the thread.  Because it requires
  123 presentation of the corresponding processor set port, this call can reset
  124 the limit to any legal value.
  125 
  126 .SH DIAGNOSTICS
  127 .TP 25
  128 KERN_SUCCESS
  129 Operation completed successfully
  130 .TP 25
  131 KERN_INVALID_ARGUMENT
  132 .B thread
  133 is not a thread, or
  134 .B processor_set
  135 is not a control port for a processor set, or
  136 .B param
  137 is invalid for the thread's current scheduling policy.
  138 .TP 25
  139 KERN_FAILURE
  140 The requested operation would violate the thread's 
  141 policy limit values
  142 (thread_set_policy_param) or the thread is not assigned to the processor set
  143 whose control port was presented.
  144 
  145 .SH BUGS
  146 Availability limited.
  147 
  148 .SH SEE ALSO
  149 .B thread_set_policy, task_set_default_policy, processor_set_policy_limit
  150 

Cache object: 3a2b1ac78fda0e4f11c60065ff1e7f7d


[ 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.