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: processor_assign.man,v $
29 .\" Revision 2.5 93/03/18 14:46:36 mrt
30 .\" corrected types
31 .\" [93/03/11 12:31:40 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:10:51 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:13:38 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:14:23 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:41:56 rpd
41 .\" Created.
42 .\"
43 .TH processor_assign 2 8/13/89
44 .CM 4
45 .SH NAME
46 .nf
47 processor_assign \- assign processor to processor set
48 processor_get_assignment \- obtain assignment of processor
49 .SH SYNOPSIS
50 .nf
51 .ft B
52 #include <mach.h>
53
54 .nf
55 .ft B
56 kern_return_t processor_assign(processor, new_set, wait)
57 mach_port_t processor;
58 mach_port_t new_set;
59 boolean_t wait;
60
61
62 .fi
63 .ft P
64 .nf
65 .ft B
66 kern_return_t processor_get_assignment(processor, assigned_set)
67 mach_port_t processor;
68 mach_port_t *assigned_set;
69
70
71 .fi
72 .ft P
73 .SH ARGUMENTS
74 .TP 15
75 .B
76 .B processor
77 The processor to be assigned.
78 .TP 15
79 .B
80 .B processor_set
81 The processor set to assign it to.
82 .TP 15
83 .B
84 .B wait
85 Whether to wait for the assignment to complete.
86 .TP 15
87 .B
88 .B assigned_set_name
89 Name port for processor set that processor is currently
90 assigned to
91
92 .SH DESCRIPTION
93 .B processor_assign
94 assigns
95 .B processor
96 to the the set
97 .B processor_set
98 .
99 After the assignment is completed, the processor only executes threads
100 that are assigned to that processor set. Any previous assignment of
101 the processor is nullified. The master processor cannot be reassigned.
102 All processors take clock interrupts at all times. The wait argument
103 indicates whether the caller should wait for the assignment to be
104 completed or should return immediately. Dedicated kernel threads are
105 used to perform processor assignment, so setting
106 .B wait
107 to
108 .B FALSE
109 allows assignment requests to be queued and performed faster, especially
110 if the kernel has more than one dedicated internal thread for processor
111 assignment.
112 Redirection of other device interrupts away from processors assigned to
113 other than the default processor set is machine-dependent. Intermediaries
114 that interpose on ports must be sure to interpose on both ports involved
115 in this call if they interpose on either.
116
117 .B processor_get_assignment
118 Obtains the current assignment of a processor.
119 The name port of the processor set is returned.
120
121 .SH DIAGNOSTICS
122 .TP 25
123 KERN_SUCCESS
124 The assignment has been performed.
125 .TP 25
126 KERN_INVALID_ARGUMENT
127 .B processor
128 is not a processor, or
129 .B processor_set
130 is not a processor_set on the same host as
131 .B processor
132 .
133
134 .SH BUGS
135 Availability limited.
136
137 .SH SEE ALSO
138 .B processor_set_create, processor_set_info, task_assign, thread_assign
139 ,
140 .B host_processor_set_priv
141
142
Cache object: 1e46cd8c76a49f57915da9691a27721c
|