Lines Matching defs:mh
3965 static void import_complex_message(ThreadId tid, mach_msg_header_t *mh)
3972 vg_assert(mh->msgh_bits & MACH_MSGH_BITS_COMPLEX);
3974 body = (mach_msg_body_t *)(mh+1);
4116 static size_t export_complex_message(ThreadId tid, mach_msg_header_t *mh)
4123 vg_assert(mh->msgh_bits & MACH_MSGH_BITS_COMPLEX);
4125 body = (mach_msg_body_t *)(mh+1);
6381 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6382 Bool self_terminate = (mh->msgh_request_port == MACH_THREAD);
6384 PRINT("thread_terminate(%s)", name_for_port(mh->msgh_request_port));
6581 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6582 Bool self_suspend = (mh->msgh_request_port == MACH_THREAD);
6584 PRINT("thread_suspend(%s)", name_for_port(mh->msgh_request_port));
6659 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6660 // Bool self = (mh->msgh_request_port == MACH_THREAD);
6663 PRINT("thread_policy(%s, ...)", name_for_port(mh->msgh_request_port));
6665 PRINT("thread_policy(thread 0x%x, ...)", mh->msgh_request_port);
6678 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6680 PRINT("thread_policy_set(%s, ...)", name_for_port(mh->msgh_request_port));
6692 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6694 PRINT("thread_info(%s, ...)", name_for_port(mh->msgh_request_port));
6817 // mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6821 // PRINT("UNHANDLED reply %d", mh->msgh_id);
6829 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6831 PRINT("mach_msg_receive(port %s)", name_for_port(mh->msgh_reply_port));
6845 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6847 switch (mh->msgh_id) {
6857 mh->msgh_id, name_for_port(mh->msgh_request_port),
6858 mh->msgh_reply_port);
6868 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6870 switch (mh->msgh_id) {
6890 mh->msgh_id, name_for_port(mh->msgh_request_port),
6891 mh->msgh_reply_port);
6903 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
6905 switch (mh->msgh_id) {
7059 mh->msgh_id, name_for_port(mh->msgh_remote_port),
7060 mh->msgh_reply_port);
7070 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
7072 switch (mh->msgh_id) {
7094 mh->msgh_id, name_for_port(mh->msgh_request_port),
7095 mh->msgh_reply_port);
7125 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
7147 (Addr)&mh->msgh_bits, sizeof(mh->msgh_bits));
7150 (Addr)&mh->msgh_remote_port, sizeof(mh->msgh_remote_port));
7152 (Addr)&mh->msgh_local_port, sizeof(mh->msgh_local_port));
7155 (Addr)&mh->msgh_id, sizeof(mh->msgh_id));
7157 if (mh->msgh_bits & MACH_MSGH_BITS_COMPLEX) {
7159 complex_header_size = export_complex_message(tid, mh);
7164 vg_assert(! (mh->msgh_bits & MACH_SEND_TRAILER));
7166 MACH_REMOTE = mh->msgh_remote_port;
7167 MACH_MSGH_ID = mh->msgh_id;
7172 PRE_MEM_WRITE("mach_msg(receive buffer)", (Addr)mh, rcv_size);
7182 else if (mh->msgh_request_port == vg_host_port) {
7187 else if (is_task_port(mh->msgh_request_port)) {
7192 else if (mh->msgh_request_port == vg_bootstrap_port) {
7197 else if (is_thread_port(mh->msgh_request_port)) {
7205 mh->msgh_id, name_for_port(mh->msgh_request_port),
7206 mh->msgh_reply_port);
7214 (Addr)((char*)mh + sizeof(mach_msg_header_t) + complex_header_size),
7223 mach_msg_header_t *mh = (mach_msg_header_t *)ARG1;
7232 (mach_msg_trailer_t *)((Addr)mh + round_msg(mh->msgh_size));
7236 POST_MEM_WRITE((Addr)mh,
7237 round_msg(mh->msgh_size) + mt->msgh_trailer_size);
7239 if (mh->msgh_bits & MACH_MSGH_BITS_COMPLEX) {
7241 import_complex_message(tid, mh);