1 .\"
2 .\" Mach Operating System
3 .\" Copyright (c) 1993,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_set_default_policy.man,v $
29 .\" Revision 2.2 93/12/07 13:57:54 dbg
30 .\" Created.
31 .\"
32 .\"
33 .TH task_set_default_policy 2 9/22/93
34 .CM 4
35 .SH NAME
36 .nf
37 task_set_default_policy \- set scheduling policy for a task
38 .SH SYNOPSIS
39 .nf
40 .ft B
41 #include <mach.h>
42
43 .nf
44 .ft B
45 kern_return_t task_set_default_policy(
46 mach_port_t task,
47 processor_set_t pset,
48 int policy,
49 policy_param_t param,
50 natural_t param_count,
51 boolean_t change_threads);
52
53
54
55 .fi
56 .ft P
57 .SH ARGUMENTS
58 .TP 15
59 .B
60 task
61 Task to set policy for.
62 .TP 15
63 .B
64 pset
65 Control port for the task's processor set.
66 .TP 15
67 .B
68 policy
69 New policy.
70 .TP 15
71 .B
72 param[param_count]
73 Scheduling parameters for the new policy.
74 .TP 15
75 .B
76 change_threads
77 Change policy of existing threads if TRUE.
78
79 .SH DESCRIPTION
80 The policy of a task is used only for creation of new threads; a new thread's
81 scheduling policy is set to the enclosing task's policy.
82 .B task_set_default_policy
83 changes this task policy. It also sets the policies and scheduling
84 parameters of all threads
85 in the task to this new policy if
86 .B change_threads
87 is TRUE. Existing threads are not affected otherwise. If this policy
88 is not available for a thread in the task, or the
89 change violates the policy limit values of some threads, as many threads as
90 possible will be changed and an error code will be returned.
91
92 .SH DIAGNOSTICS
93 .TP 25
94 KERN_SUCCESS
95 The call succeeded.
96 .TP 25
97 KERN_INVALID_ARGUMENT
98 .B task
99 is not a task, or
100 .B policy
101 is not a valid policy, or
102 .B param
103 is not valid for the policy.
104 .TP 25
105 KERN_FAILURE
106 .B change_threads
107 was TRUE and the attempt to change the policy of at least one existing
108 thread failed because the thread's processor set does not run that
109 policy, or
110 the new policy parameters would have exceeded that thread's
111 policy limit values.
112
113 .SH BUGS
114 Availability limited.
115
116 .SH SEE ALSO
117 .B thread_set_policy_param, processor_set_policy_limit.
118
119
120
Cache object: ed0f77d3e1a02c59b4b767556acd6dd7
|