131 |
|
|
132 |
/* ??? handle send-once right here? */ |
/* ??? handle send-once right here? */ |
133 |
|
|
134 |
kmsg->remote_port = entry->ie_port; |
kmsg->destination_port = entry->ie_port; |
135 |
msgh->msgh_remote_port = (rtmk_port_t) entry->ie_port; |
msgh->msgh_local_port = (rtmk_port_t) entry->ie_port; |
136 |
|
|
137 |
/* Fetch local port from IPC object. */ |
/* Fetch local port from IPC object. */ |
138 |
if (local_name) |
if (local_name) |
149 |
|
|
150 |
/* ??? handle send-one right here? */ |
/* ??? handle send-one right here? */ |
151 |
|
|
152 |
kmsg->local_port = entry->ie_port; |
kmsg->reply_port = entry->ie_port; |
153 |
msgh->msgh_local_port = (rtmk_port_t) entry->ie_port; |
msgh->msgh_remote_port = (rtmk_port_t) entry->ie_port; |
154 |
|
} |
155 |
|
else |
156 |
|
{ |
157 |
|
kmsg->reply_port = 0; |
158 |
|
msgh->msgh_remote_port = 0; |
159 |
} |
} |
160 |
|
|
161 |
return KERN_SUCCESS; |
return KERN_SUCCESS; |
306 |
rtmk_port_t remote_name, local_name; |
rtmk_port_t remote_name, local_name; |
307 |
kern_return_t kr; |
kern_return_t kr; |
308 |
|
|
309 |
remote_port = (struct ipc_port *) msgh->msgh_remote_port; |
remote_port = kmsg->destination_port; |
310 |
remote_type = RTMK_MSGH_BITS_REMOTE (msgh->msgh_bits); |
remote_type = RTMK_MSGH_BITS_REMOTE (msgh->msgh_bits); |
311 |
|
|
312 |
local_port = (struct ipc_port *) msgh->msgh_local_port; |
local_port = kmsg->reply_port; |
313 |
local_type = RTMK_MSGH_BITS_LOCAL (msgh->msgh_bits); |
local_type = RTMK_MSGH_BITS_LOCAL (msgh->msgh_bits); |
314 |
|
|
315 |
/* Insert remote object into tasks IPC object. */ |
/* Insert remote object into tasks IPC object. */ |
320 |
& remote_name); |
& remote_name); |
321 |
if (kr != KERN_SUCCESS) |
if (kr != KERN_SUCCESS) |
322 |
return kr; |
return kr; |
323 |
|
msgh->msgh_local_port = remote_name; |
|
msgh->msgh_remote_port = remote_name; |
|
324 |
} |
} |
325 |
|
|
326 |
|
|
332 |
& local_name); |
& local_name); |
333 |
if (kr != KERN_SUCCESS) |
if (kr != KERN_SUCCESS) |
334 |
return kr; |
return kr; |
335 |
|
msgh->msgh_remote_port = local_name; |
|
msgh->msgh_local_port = local_name; |
|
336 |
} |
} |
337 |
|
|
338 |
return KERN_SUCCESS; |
return KERN_SUCCESS; |
375 |
|
|
376 |
/* First we fill the kmsg structure with some information. */ |
/* First we fill the kmsg structure with some information. */ |
377 |
|
|
378 |
kmsg->remote_port = (struct ipc_port *) msgh->msgh_remote_port; |
kmsg->destination_port = (struct ipc_port *) msgh->msgh_remote_port; |
379 |
kmsg->local_port = (struct ipc_port *) msgh->msgh_local_port; |
kmsg->reply_port = (struct ipc_port *) msgh->msgh_local_port; |
380 |
|
|
381 |
/* Kernel never sends simple messages and it never sends to itself. */ |
/* Kernel never sends simple messages and it never sends to itself. */ |
382 |
|
|