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: mach_port_deallocate.man,v $
29 .\" Revision 2.6 93/05/10 19:31:05 rvb
30 .\" updated
31 .\" [93/04/21 16:03:16 lli]
32 .\"
33 .\" Revision 2.1.1.1 93/04/21 16:01:44 lli
34 .\" updated
35 .\"
36 .\" Revision 2.5 91/12/11 08:42:46 jsb
37 .\" Changed <mach/mach.h> to <mach.h>.
38 .\" [91/11/25 10:55:16 rpd]
39 .\"
40 .\" Revision 2.4 91/05/14 17:06:00 mrt
41 .\" Correcting copyright
42 .\"
43 .\" Revision 2.3 91/02/14 14:11:04 mrt
44 .\" Changed to new Mach copyright
45 .\" [91/02/12 18:11:15 mrt]
46 .\"
47 .\" Revision 2.2 90/08/07 18:36:10 rpd
48 .\" Created.
49 .\"
50 .TH mach_port_deallocate 2 9/19/86
51 .CM 4
52 .SH NAME
53 .nf
54 mach_port_deallocate \- releases a user reference for a right
55 .SH SYNOPSIS
56 .nf
57 .ft B
58 #include <mach.h>
59
60 kern_return_t
61 mach_port_deallocate(task, name)
62 mach_port_t task;
63 mach_port_t name;
64 .fi
65 .ft P
66 .SH ARGUMENTS
67 .TP 12
68 .B
69 task
70 The task holding the right.
71 .TP 12
72 .B
73 name
74 The task's name for the right.
75 .SH DESCRIPTION
76 \fBmach_port_deallocate\fR releases a user reference for a right.
77 It allows a task to release a user reference for a send or send-once
78 right without failing if the port has died and the right is now
79 actually a dead name.
80
81 If \fBname\fR denotes a dead name, send right, or send-once right,
82 then the right loses one user reference. If it only had
83 one user reference, then the right is destroyed.
84 .SH DIAGNOSTICS
85 .TP 25
86 KERN_SUCCESS
87 The call succeeded.
88 .TP 25
89 KERN_INVALID_TASK
90 \fBtask\fR was invalid.
91 .TP 25
92 KERN_INVALID_NAME
93 \fBname\fR did not denote a right.
94 .TP 25
95 KERN_INVALID_RIGHT
96 \fBname\fR denoted an invalid right.
97 .PP
98 The \fBmach_port_deallocate\fR call is actually an RPC to \fBtask\fR,
99 normally a send right for a task port, but potentially any send right.
100 In addition to the normal diagnostic
101 return codes from the call's server (normally the kernel),
102 the call may return \fBmach_msg(2)\fR return codes.
103 .SH SEE ALSO
104 mach_port_mod_refs(2), mach_port_destroy(2).
Cache object: 373b7282ddefb18bd57dc7b0d31d2473
|