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_policy.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:       thread_policy.man,v $
   29 .\" Revision 2.4  91/05/14  17:14:12  mrt
   30 .\"     Correcting copyright
   31 .\" 
   32 .\" Revision 2.3  91/02/14  14:15:20  mrt
   33 .\"     Changed to new Mach copyright
   34 .\"     [91/02/12  18:16:11  mrt]
   35 .\" 
   36 .\" Revision 2.2  90/08/07  18:46:06  rpd
   37 .\"     Created.
   38 .\" 
   39 .TH thread_policy 2 8/13/89
   40 .CM 4
   41 .SH NAME
   42 .nf
   43 thread_policy  \-  set schedulng policy for a thread
   44 .SH SYNOPSIS
   45 .nf
   46 .ft B
   47 #include <mach.h>
   48 
   49 .nf
   50 .ft B
   51 kern_return_t thread_policy(thread, policy, data)
   52         thread_t        thread;
   53         int             policy;
   54         int             data;
   55 
   56 
   57 .fi
   58 .ft P
   59 .SH ARGUMENTS
   60 .TP 15
   61 .B
   62 thread
   63 Thread to set policy for.
   64 .TP 15
   65 .B
   66 policy
   67 Policy to set.
   68 .TP 15
   69 .B
   70 data
   71 Policy-specific data.
   72 
   73 .SH DESCRIPTION
   74 .B thread_policy
   75 changes the scheduling policy for 
   76 .B thread
   77 to 
   78 .B policy.
   79 
   80 .B data
   81 is policy-dependent scheduling information.  There are currently two
   82 supported policies: 
   83 .B POLICY_TIMESHARE
   84 and 
   85 .B POLICY_FIXEDPRI
   86 defined in <mach/policy.h>; this file is included by mach.h.
   87 .B data
   88 is meaningless for timesharing, but is the quantum to be used (in milliseconds)
   89 for the fixed priority policy.  To be meaningful, this quantum must be
   90 a multiple of the basic system quantum (min_quantum) which can be obtained
   91 from 
   92 .B host_info.
   93 The system will always round up to the next multiple of the quantum.
   94 
   95 Processor sets may restrict the allowed policies, so this call will fail
   96 if the processor set to which 
   97 .B thread
   98 is currently assigned does not permit 
   99 .B policy.
  100 
  101 .SH DIAGNOSTICS
  102 .TP 25
  103 KERN_SUCCESS
  104 The call succeeded.
  105 .TP 25
  106 KERN_INVALID_ARGUMENT
  107 .B thread
  108 is not a thread, or
  109 .B policy
  110 is not a recognized policy.
  111 .TP 25
  112 KERN_FAILURE
  113 The processor set to which 
  114 .B thread
  115 is currently assigned does not permit 
  116 .B policy.
  117 
  118 .SH BUGS
  119 Availability limited.  Fixed priority not supported on all systems.
  120 
  121 .SH SEE ALSO
  122 .B task_policy, processor_set_policy, host_info
  123 
  124 
  125 

Cache object: 1032e78a1b1e9ded4e281716ba3eedd3


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