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_get_special_port.man,v $
29 .\" Revision 2.2 93/03/18 15:15:40 mrt
30 .\" corrected types
31 .\" [93/03/12 16:54:00 lli]
32 .\"
33 .\" Revision 2.4 91/05/14 17:14:32 mrt
34 .\" Correcting copyright
35 .\"
36 .\" Revision 2.3 91/02/14 14:15:36 mrt
37 .\" Changed to new Mach copyright
38 .\" [91/02/12 18:16:27 mrt]
39 .\"
40 .\" Revision 2.2 90/08/07 18:46:31 rpd
41 .\" Created.
42 .\"
43 .TH thread_get_special_port 2 1/20/88
44 .CM 4
45 .SH NAME
46 .nf
47 thread_get_special_port \- returns a special port of a thread
48 thread_set_special_port \- set a special port of a thread
49 .SH SYNOPSIS
50 .nf
51 .ft B
52 #include <mach.h>
53
54 .nf
55 .ft B
56 kern_return_t thread_get_special_port(thread, which_port, special_port)
57 mach_port_t thread;
58 int which_port;
59 mach_port_t *special_port;
60
61
62 .fi
63 .ft P
64 .nf
65 .ft B
66 kern_return_t thread_set_special_port(thread, which_port, special_port)
67 mach_port_t thread;
68 int which_port;
69 mach_port_t special_port;
70
71
72 .fi
73 .ft P
74 .SH ARGUMENTS
75 .TP 15
76 .B
77 thread
78 The thread for which to get the port
79 .TP 15
80 .B
81 which_port
82 the port that is requested. Is one of
83 .B THREAD_EXCEPTION_PORT
84 .
85 .TP 15
86 .B
87 special_port
88 the value of the port that is being requested or
89 being set.
90
91 .SH DESCRIPTION
92
93 .B get_special_port
94 returns send rights to one of a set of special ports
95 for the thread specified by
96 .B thread
97 .
98
99 .B set_special_port
100 sets one of a set of special ports for the thread specified
101 by
102 .B thread
103 .
104
105 The following macros to call
106 .B thread_get/set_special_port
107 for a specific
108 port are defined in
109 .B <mach/thread_special_ports.h>
110 :
111 .B thread_get_exception_port
112 and
113 .B thread_set_exception_port
114 .
115
116 A thread also has access to its task's special ports.
117
118 .SH DIAGNOSTICS
119 .TP 25
120 KERN_SUCCESS
121 The port was returned or set.
122 .TP 25
123 KERN_INVALID_ARGUMENT
124 .B thread
125 is not a thread or
126 .B which_port
127 is an invalid port selector.
128
129 .SH SEE ALSO
130 .B task_special_ports,thread_create
131
132 .SH BUGS
133 .B THREAD_KERNEL_PORT
134 may be added to the set of ports that
135 .B thread_set_special_port
136 accepts.
Cache object: cff173d3ec36fe38860e26c987d5b6ec
|