- introduce mach_port_destroy (badly emulated for now)
- on fork/exec, don't set l_private, as the process might be not mature
enough to survive a proc_representative_lwp call (-> kernel panic)
Once we give WindowServer the io_master_port, it sends a message to it:
305 WindowServer MMSG id 2804 [0x1310009 -> 0x131000e] -12016 bytes, flags 0
x1513
0x0000 0x00001513 0xffffd110 0x0131000e 0x01310009 .........1...1..
0x0010 0xffffcfd0 0x00000af4 0x00000000 0x00000000 ................
0x0020 0xffffcf60 0x00000052 0x3c646963 0x74204944 ...`...R<dict ID
0x0030 0x3d223022 0x3e3c6b65 0x793e494f 0x50726f76 ="0"><key>IOProv
0x0040 0x69646572 0x436c6173 0x733c2f6b 0x65793e3c iderClass</key><
0x0050 0x73747269 0x6e672049 0x443d2231 0x223e494f string ID="1">IO
0x0060 0x48494453 0x79737465 0x6d3c2f73 0x7472696e HIDSystem</strin
0x0070 0x673e3c2f 0x64696374 0x3e0047cc g></dict>.G.
Did you ever dreamt about system call arguments in XML?
There are two new mach traps:
mach_vm_make_memory_entry, mach_host_get_io_master. Now we need to find
the documentation to understand what they are supposed to do.
This does not buy us new functionnality for now, because we still have to
discover how mach_init (which acts as a name server, enabling processes to
discover each other's ports) is able to receive messages from other processes
(this is a bootstrap problem, and the bootstrap port might be the place to
search).
While we are there:
- removed a lot of debug which is now available using ktrace.
- reworked message handling to avoid mutliple copyin/copyout of the
same data. ktrace of Mach message now uses the in-kernel copy of the
message instead of copying it from userland.
- packed mach trap handlers arguments into a structure to avoid modifying
everything next time we have to add an argument.
Check for target buffer length, and fail if it is too short
Move mach_msg_trap and mach_msg_overwrite_trap to their own file
Remove some useless debug messages now we have ktrace
Remove __P()