]>
Commit | Line | Data |
---|---|---|
c84142e8 UD |
1 | /* Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. |
2 | This file is part of the GNU C Library. | |
28f540f4 | 3 | |
c84142e8 UD |
4 | The GNU C Library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public License as | |
6 | published by the Free Software Foundation; either version 2 of the | |
7 | License, or (at your option) any later version. | |
28f540f4 | 8 | |
c84142e8 UD |
9 | The GNU C Library is distributed in the hope that it will be useful, |
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | Library General Public License for more details. | |
28f540f4 | 13 | |
c84142e8 UD |
14 | You should have received a copy of the GNU Library General Public |
15 | License along with the GNU C Library; see the file COPYING.LIB. If not, | |
16 | write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
17 | Boston, MA 02111-1307, USA. */ | |
28f540f4 RM |
18 | |
19 | /* Useful declarations and support functions for MiG-generated stubs. */ | |
20 | ||
21 | #ifndef _MACH_MIG_SUPPORT_H | |
22 | ||
23 | #define _MACH_MIG_SUPPORT_H 1 | |
24 | ||
25 | #include <mach/std_types.h> | |
26 | #include <mach/message.h> | |
27 | #include <sys/types.h> | |
28 | #include <string.h> | |
29 | ||
30 | /* MiG initialization. */ | |
31 | extern void __mig_init (void *__first); | |
32 | extern void mig_init (void *__first); | |
33 | ||
34 | /* Shorthand functions for vm_allocate and vm_deallocate on | |
35 | mach_task_self () (and with ANYWHERE=1). */ | |
36 | extern void __mig_allocate (vm_address_t *__addr_p, vm_size_t __size); | |
37 | extern void mig_allocate (vm_address_t *__addr_p, vm_size_t __size); | |
38 | extern void __mig_deallocate (vm_address_t __addr, vm_size_t __size); | |
39 | extern void mig_deallocate (vm_address_t __addr, vm_size_t __size); | |
40 | ||
41 | /* Reply-port management support functions. */ | |
42 | extern void __mig_dealloc_reply_port (mach_port_t); | |
43 | extern void mig_dealloc_reply_port (mach_port_t); | |
44 | extern mach_port_t __mig_get_reply_port (void); | |
45 | extern mach_port_t mig_get_reply_port (void); | |
46 | extern void __mig_put_reply_port (mach_port_t); | |
47 | extern void mig_put_reply_port (mach_port_t); | |
48 | ||
49 | extern void __mig_reply_setup (const mach_msg_header_t *__request, | |
50 | mach_msg_header_t *__reply); | |
51 | extern void mig_reply_setup (const mach_msg_header_t *__request, | |
52 | mach_msg_header_t *__reply); | |
53 | ||
54 | /* Idiocy support function. */ | |
55 | extern __inline vm_size_t | |
56 | __mig_strncpy (char *__dst, const char *__src, vm_size_t __len) | |
57 | { | |
58 | return __stpncpy (__dst, __src, __len) - __dst; | |
59 | } | |
c84142e8 | 60 | extern __inline vm_size_t |
28f540f4 RM |
61 | mig_strncpy (char *__dst, const char *__src, vm_size_t __len) |
62 | { | |
63 | return __mig_strncpy (__dst, __src, __len); | |
64 | } | |
65 | ||
66 | ||
67 | ||
68 | #endif /* mach/mig_support.h */ |