summaryrefslogtreecommitdiff
path: root/include/mach/mach_norma.defs
blob: 01b3872367f74b52dd7211796616313947a7c6b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
/* 
 * Mach Operating System
 * Copyright (c) 1991 Carnegie Mellon University
 * All Rights Reserved.
 * 
 * Permission to use, copy, modify and distribute this software and its
 * documentation is hereby granted, provided that both the copyright
 * notice and this permission notice appear in all copies of the
 * software, derivative works or modified versions, and any portions
 * thereof, and that both notices appear in supporting documentation.
 * 
 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
 * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
 * 
 * Carnegie Mellon requests users of this software to return to
 * 
 *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
 *  School of Computer Science
 *  Carnegie Mellon University
 *  Pittsburgh PA 15213-3890
 * 
 * any improvements or extensions that they make and grant Carnegie Mellon
 * the rights to redistribute these changes.
 */

subsystem
#if	KERNEL_USER
	  KernelUser
#endif
#if	KERNEL_SERVER
	  KernelServer
#endif
		       mach_norma 555000;
#ifdef	KERNEL_USER
userprefix r_;
#endif

#include <mach/std_types.defs>
#include <mach/mach_types.defs>

skip;

/*
 * Specify a node upon which children tasks will be created.
 * This call exists only to allow testing with unmodified servers.
 * Server developers should use norma_task_create instead.
 */
routine	task_set_child_node(
		target_task	: task_t;
		child_node	: int);

/*
 * THIS CALL WILL BE ELIMINATED.
 * Use norma_port_location_hint(,mach_task_self(),) instead.
 */
routine norma_node_self(
		host		: host_t;
	out	node		: int);

skip;

skip;

skip;

/*
 * (Used to be called task_create_remote.)
 * Create a task on the given node, possibly inheriting memory.
 * Same inheritance semantics as task_create, including inheritance
 * of initial ports and emulation library.
 * Setting child_node to node_self forces local task creation.
 */
routine norma_task_create(
		target_task	: task_t;
		inherit_memory	: boolean_t;
		child_node	: int;
	out	child_task	: task_t);

/*
 * Get a given special port for a given node.
 * Norma special ports are defined in norma_special_ports.h;
 * examples include the master device port.
 * There are a limited number of slots available for system servers.
 *
 * XXX MAX_SPECIAL_ID should be defined in norma_special_ports.h,
 * XXX not just in norma/ipc_special.c!
 * (MAX_SPECIAL_ID specifies total number of slots available)
 */
routine	norma_get_special_port(
		host_priv	: host_priv_t;
		node		: int;
		which		: int;
	out	port		: mach_port_t);

/*
 * Set a given special port for a given node.
 * See norma_get_special_port.
 */
routine	norma_set_special_port(
		host_priv	: host_priv_t;
		which		: int;
		port		: mach_port_t);

skip;

skip;

skip;

/*
 * Return best guess of port's current location.
 * Guaranteed to be a node where the port once was.
 * Guaranteed to be accurate if port has never moved.
 * Can be used to determine residence node for hosts, tasks, threads, etc.
 */
routine norma_port_location_hint(
		task		: task_t;
		port		: mach_port_t;
	out	node		: int);