Lines Matching refs:msg

117 	ipc_complex_ool_message msg;  in send_ool_memory()  local
118 bzero(&msg, sizeof(ipc_complex_ool_message)); in send_ool_memory()
132 msg.header = hdr; in send_ool_memory()
133 msg.body.msgh_descriptor_count = 1; in send_ool_memory()
134 msg.dsc = dsc; in send_ool_memory()
140 kern_return_t kr = mach_msg(&msg.header, MACH_SEND_MSG, msg.header.msgh_size, in send_ool_memory()
336 ipc_complex_ool_message msg; in receive_ool_memory() local
338 kern_return_t kr = mach_msg(&msg.header, MACH_RCV_MSG, 0, sizeof(msg), in receive_ool_memory()
342 switch (msg.dsc.copy) { in receive_ool_memory()
350 uint64_t *received_data = (uint64_t*) msg.dsc.address; in receive_ool_memory()
351 for (uint i = 0; i < msg.dsc.size / sizeof(uint64_t); ++i) { in receive_ool_memory()
355 T_LOG("Successfully read and verified received %u bytes of data", msg.dsc.size); in receive_ool_memory()
361 T_FAIL("Unexpected copy option: %d", msg.dsc.copy); in receive_ool_memory()
414 ipc_complex_port_message msg; in send_memory_entry() local
415 bzero(&msg, sizeof(ipc_complex_port_message)); in send_memory_entry()
427 msg.header = hdr; in send_memory_entry()
428 msg.body.msgh_descriptor_count = 1; in send_memory_entry()
429 msg.dsc = dsc; in send_memory_entry()
430 msg.is_share = is_share; in send_memory_entry()
431 msg.size = size; in send_memory_entry()
434 kr = mach_msg(&msg.header, MACH_SEND_MSG, msg.header.msgh_size, 0, in send_memory_entry()
581 ipc_complex_port_message msg; in receive_memory_entry() local
583 kern_return_t kr = mach_msg(&msg.header, MACH_RCV_MSG, 0, sizeof(msg), rcv_port, 0, 0); in receive_memory_entry()
586 …T_EXPECT_FALSE(msg.is_share, "it should not be possible to create + send a tagged share memory ent… in receive_memory_entry()
589 if (!msg.is_share && msg.size <= KERNEL_BUFFER_COPY_THRESHOLD) { in receive_memory_entry()
591 kr = mach_vm_map(mach_task_self(), &addr, msg.size, /* mask = */ 0, in receive_memory_entry()
592 VM_FLAGS_ANYWHERE, msg.dsc.name, /* offset = */ 0, /* copy = */ false, in receive_memory_entry()
596 kr = mach_vm_deallocate(mach_task_self(), addr, msg.size); in receive_memory_entry()
599 kr = mach_vm_map(mach_task_self(), &addr, msg.size, /* mask = */ 0, in receive_memory_entry()
600 VM_FLAGS_ANYWHERE, msg.dsc.name, /* offset = */ 0, /* copy = */ true, in receive_memory_entry()
604 kr = mach_vm_deallocate(mach_task_self(), addr, msg.size); in receive_memory_entry()