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