1 /*
2 * Mach Operating System
3 * Copyright (c) 1992 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: mig_support.h,v $
29 * Revision 2.6 93/05/14 15:10:07 rvb
30 * #include string.h -> strings.h
31 * [93/05/14 rvb]
32 *
33 * Revision 2.5 93/05/10 21:20:03 rvb
34 * size_t --> vm_size_t.
35 * [93/04/09 af]
36 *
37 * Revision 2.4 93/05/10 17:47:54 rvb
38 * Totally eliminate size_t.
39 * [93/05/04 17:42:35 rvb]
40 *
41 * Revision 2.3 93/03/11 13:46:26 danner
42 * eliminate size_t.
43 * [93/03/09 danner]
44 *
45 * Revision 2.2 93/01/14 17:45:03 danner
46 * Changed the argument to mig_init to void * for compatibility
47 * with the C-Threads mig_init.
48 * [92/12/18 pds]
49 * Define memcpy to be bcopy in the kernel, otherwise include string.h.
50 * Added include of sys/types.h.
51 * [92/12/17 pds]
52 * Created.
53 * [92/12/11 pds]
54 *
55 */
56
57 /*
58 * Abstract:
59 * Header file for support routines called by MiG generated interfaces.
60 *
61 */
62
63 #ifndef _MACH_MIG_SUPPORT_H_
64 #define _MACH_MIG_SUPPORT_H_
65
66 #include <mach/std_types.h>
67 #include <mach/message.h>
68 #include <sys/types.h>
69
70 #if defined(KERNEL)
71
72 #if defined(bcopy)
73 #else /* not defined(bcopy) */
74 extern void bcopy(const void *, void *, vm_size_t);
75 #define memcpy(_dst,_src,_len) bcopy((_src),(_dst),(_len))
76 #endif /* defined(bcopy) */
77
78 #else /* not defined(KERNEL) */
79
80 #include <strings.h>
81
82 #endif /* defined(KERNEL) */
83
84 extern void mig_init(void *_first);
85
86 extern void mig_allocate(vm_address_t *_addr_p, vm_size_t _size);
87
88 extern void mig_deallocate(vm_address_t _addr, vm_size_t _size);
89
90 extern void mig_dealloc_reply_port(void);
91
92 extern mach_port_t mig_get_reply_port(void);
93
94 extern void mig_reply_setup(const mach_msg_header_t *_request,
95 mach_msg_header_t *reply);
96
97 #ifndef KERNEL
98 extern vm_size_t mig_strncpy(char *_dest, const char *_src, vm_size_t _len);
99 #endif
100
101 #endif /* not defined(_MACH_MIG_SUPPORT_H_) */
Cache object: f9a201c531d4de5acd4382a8bfb93b28
|