Sean Kelly wrote: > An OS call isn't always involved. See, for example: > http://en.wikipedia.org/wiki/Futex. Then you can write the mutex as your own external function which cannot be inlined.