|
|
|
|
|
by comex
2386 days ago
|
|
Yeah, looks like 10.14 and iOS 12. I actually hadn't realized it was so new. Before that, it seems that priority inheritance ("promotion") had long existed for kernel-internal locks [1], but not for anything in userland. It also seems that the behavior of supporting but ignoring PTHREAD_PRIO_INHERIT long predates turnstiles, which is pretty annoying. As for origins... xnu's implementation appears to be written from scratch, but in terms of inspiration for the design and name, I'm not sure. Aside from Solaris, another possibility is FreeBSD [2] (but note that xnu's turnstiles are in the Mach side of the codebase rather than the BSD side). [1] https://opensource.apple.com/source/xnu/xnu-1504.15.3/osfmk/... [2] https://github.com/freebsd/freebsd/commits/master/sys/sys/tu... |
|