17 |
|
|
18 |
#include "libkern.h" |
#include "libkern.h" |
19 |
#include "vm-syscall.h" |
#include "vm-syscall.h" |
20 |
|
#include "trace.h" |
21 |
|
|
22 |
typedef struct thread *thread_t; |
typedef struct thread *thread_t; |
23 |
typedef struct task *task_t; |
typedef struct task *task_t; |
51 |
return KERN_SUCCESS; |
return KERN_SUCCESS; |
52 |
} |
} |
53 |
|
|
54 |
|
static inline kern_return_t convert_task_to_port (rtmk_msg_type_t **msgtp, |
55 |
|
struct task *task) |
56 |
|
{ |
57 |
|
struct std_mfield_desc *mfield = (struct std_mfield_desc *) *msgtp; |
58 |
|
struct rtmk_msg_type type = |
59 |
|
{ |
60 |
|
RTMK_MSG_TYPE_COPY_SEND, |
61 |
|
32, |
62 |
|
TRUE, |
63 |
|
FALSE |
64 |
|
}; |
65 |
|
|
66 |
|
mfield->type = type; |
67 |
|
mfield->port = task->task_port; |
68 |
|
|
69 |
|
*msgtp = (rtmk_msg_type_t *) (mfield + 1); |
70 |
|
return KERN_SUCCESS; |
71 |
|
} |
72 |
|
|
73 |
static inline kern_return_t convert_port_to_thread (rtmk_msg_type_t **msgtp, |
static inline kern_return_t convert_port_to_thread (rtmk_msg_type_t **msgtp, |
74 |
struct thread **thread) |
struct thread **thread) |
75 |
{ |
{ |