On Sun, Feb 28, 2016 at 06:01:03PM +0100, Justus Winter wrote: > I'm curious why your mechanism is faster, because you implemented it > using messages sent to the kernel using mach_msg, and not as traps. > This is ok for a prototype of course, but you should look at how > e.g. mach_port_deallocate is also available as a trap.
It's faster because it's futexes. The fact that there is a trap or not only matters in the worst case, and personally I'd still do it with mach_msg for consistency (trap based messaging is just a dirty performance hack). -- Richard Braun