2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
21 * @APPLE_LICENSE_HEADER_END@
25 * Author: Avadis Tevanian, Jr.
27 * Copyright (C) 1987, Avadis Tevanian, Jr.
29 * Convert machine slot values to human readable strings.
32 * 26-Jan-88 Mary Thompson (mrt) at Carnegie Mellon
33 * added case for CUP_SUBTYPE_RT_APC
35 * 28-Feb-87 Avadis Tevanian (avie) at Carnegie-Mellon University
40 #include <mach/mach.h>
41 #include <mach-o/arch.h>
45 * Convert the specified cpu_type/cpu_subtype pair to their
46 * human readable form.
48 void slot_name(cpu_type
, cpu_subtype
, cpu_name
, cpu_subname
)
50 cpu_subtype_t cpu_subtype
;
51 char **cpu_name
, **cpu_subname
;
53 register char *name
= "Unknown CPU";
54 register char *subname
= "";
55 const NXArchInfo
*ai
= NXGetArchInfoFromCpuType(cpu_type
, cpu_subtype
);
57 name
= (char *)ai
->name
;
58 subname
= (char *)ai
->description
;
61 *cpu_subname
= subname
;
64 kern_return_t
msg_rpc(void) {
68 kern_return_t
msg_send(void) {
72 kern_return_t
msg_receive(void) {
76 mach_port_t
task_self_(void) {
77 return mach_task_self();
80 mach_port_t
host_self(void) {
81 return mach_host_self();