> ... almost all synchronization primitives can be implemented with each other
Not to mention that any partial recursive function can be computed by a machine which can move along an unlimited tape, reading or writing a symbol, according to a handful of rules. :)
> And as you point out, the various mutex incarnations usually have an easier time of tracking ownership and debugging
Ownership, whether or not the owning thread died, deadlock detection, recursion detection ... priority inversion handling like priority inheritance ...
However, as you say, some end up being hideously complicated. Some are "closer to the metal" than others - both in terms of the actual instruction set implementation, and kernel mechanisms used.
I've never been a fan of semaphores, because when used with count>1, they tend to be duplicating some other information in the system, which is easy to get out of sync. When used with just count 0 or 1, it's more intuitive (and closer to underlying implementation) to just use a mutex. And as you point out, the various mutex incarnations usually have an easier time of tracking ownership and debugging, by their nature.