]> git.ipfire.org Git - thirdparty/glibc.git/blame - mach/mach/mig_support.h
Update.
[thirdparty/glibc.git] / mach / mach / mig_support.h
CommitLineData
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. */
31extern void __mig_init (void *__first);
32extern void mig_init (void *__first);
33
34/* Shorthand functions for vm_allocate and vm_deallocate on
35 mach_task_self () (and with ANYWHERE=1). */
36extern void __mig_allocate (vm_address_t *__addr_p, vm_size_t __size);
37extern void mig_allocate (vm_address_t *__addr_p, vm_size_t __size);
38extern void __mig_deallocate (vm_address_t __addr, vm_size_t __size);
39extern void mig_deallocate (vm_address_t __addr, vm_size_t __size);
40
41/* Reply-port management support functions. */
42extern void __mig_dealloc_reply_port (mach_port_t);
43extern void mig_dealloc_reply_port (mach_port_t);
44extern mach_port_t __mig_get_reply_port (void);
45extern mach_port_t mig_get_reply_port (void);
46extern void __mig_put_reply_port (mach_port_t);
47extern void mig_put_reply_port (mach_port_t);
48
49extern void __mig_reply_setup (const mach_msg_header_t *__request,
50 mach_msg_header_t *__reply);
51extern void mig_reply_setup (const mach_msg_header_t *__request,
52 mach_msg_header_t *__reply);
53
54/* Idiocy support function. */
55extern __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 60extern __inline vm_size_t
28f540f4
RM
61mig_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 */