1 |
/* Translate mach port names between two tasks |
/* Translate mach port names between two tasks |
2 |
|
|
3 |
Copyright (C) 1996, 1999 Free Software Foundation, Inc. |
Copyright (C) 1996,99,2002 Free Software Foundation, Inc. |
4 |
|
Written by Miles Bader <miles@gnu.org> |
|
Written by Miles Bader <miles@gnu.ai.mit.edu> |
|
5 |
|
|
6 |
This program is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or |
7 |
modify it under the terms of the GNU General Public License as |
modify it under the terms of the GNU General Public License as |
60 |
} |
} |
61 |
else |
else |
62 |
{ |
{ |
63 |
munmap ((caddr_t) x->to_names, |
munmap ((caddr_t) x->to_names, |
64 |
x->to_names_len * sizeof (mach_port_t)); |
x->to_names_len * sizeof (mach_port_t)); |
65 |
munmap ((caddr_t) x->to_types, |
munmap ((caddr_t) x->to_types, |
66 |
x->to_types_len * sizeof (mach_port_type_t)); |
x->to_types_len * sizeof (mach_port_type_t)); |
67 |
err = ENOMEM; |
err = ENOMEM; |
68 |
} |
} |
107 |
error_t err; |
error_t err; |
108 |
mach_port_t port; |
mach_port_t port; |
109 |
mach_msg_type_number_t i; |
mach_msg_type_number_t i; |
110 |
mach_port_type_t aquired_type; |
mach_msg_type_name_t aquired_type; |
111 |
mach_port_type_t valid_to_types; |
mach_msg_type_name_t valid_to_types; |
112 |
|
|
113 |
if (from_type == 0) |
if (from_type == 0) |
114 |
{ |
{ |