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_get_special_ports.man,v $
29 .\" Revision 2.2 93/03/18 15:14:47 mrt
30 .\" corrected types
31 .\" [93/03/12 16:52:46 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:13:03 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:14:45 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:15:35 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:44:17 rpd
41 .\" Created.
42 .\"
43 .TH task_special_ports 2 1/20/88
44 .CM 4
45 .SH NAME
46 .nf
47 task_get_special_port \- returns a special port of a task
48 task_set_special_port \- set a special port of a task
49 .SH SYNOPSIS
50 .nf
51 .ft B
52 #include <mach.h>
53
54 .nf
55 .ft B
56 kern_return_t task_get_special_port(task, which_port, special_port)
57 mach_port_t task;
58 int which_port;
59 mach_port_t *special_port; /* out */
60
61
62 .fi
63 .ft P
64 .nf
65 .ft B
66 kern_return_t task_set_special_port(task, which_port, special_port)
67 mach_port_t task;
68 int which_port;
69 mach_port_t special_port;
70
71
72
73 .fi
74 .ft P
75 .SH ARGUMENTS
76 .TP 15
77 .B
78 task
79 The task for which to get the port
80 .TP 15
81 .B
82 which_port
83 the port that is requested. Is one of
84 .B TASK_BOOTSTRAP_PORT
85 ,
86 .B TASK_EXCEPTION_PORT
87 .
88 .TP 15
89 .B
90 special_port
91 the value of the port that is being requested or
92 being set.
93
94 .SH DESCRIPTION
95
96 .B get_special_port
97 returns send rights to one of a set of special
98 ports for the task specified by \fBtask\fR.
99
100 .B set_special_port
101 sets one of a set of special ports for the task specified
102 by
103 .B task
104 .
105
106 The special ports associated with a task are the
107 .B bootstrap port
108 and the
109 .B exception port
110 . The bootstrap port is a port to which a thread
111 may send a message requesting other system service ports. This port is not
112 used by the kernel. The task's
113 exception port is the port to which messages are sent by the kernel when an exception
114 occurs and the thread causing the exception has no exception port of
115 its own.
116
117 The following macros to call
118 .B task_set/get_special_port
119 for a specific port
120 are defined in
121 .B <mach/task_special_ports.h>
122 :
123 .B task_get_exception_port
124 ,
125 .B task_set_exception_port
126 ,
127 .B task_get_bootstrap_port
128 and
129 .B task_set_bootstrap_port
130 .
131
132 .SH DIAGNOSTICS
133 .TP 25
134 KERN_SUCCESS
135 The port was returned or set.
136 .TP 25
137 KERN_INVALID_ARGUMENT
138 .B task
139 is not a task or
140 .B which_port
141 is an invalid port selector.
142
143 .SH SEE ALSO
144 .B thread_special_ports,task_create
145
146 .SH BUGS
147 The call on the bootstrap port to get system service ports
148 has not been implemented yet.
149
150 .B TASK_KERNEL_PORT
151 may be added to the set of ports that
152 .B task_set_special_port
153 accepts.
Cache object: 837e8b967df8318adbc3a31750d5c872
|