-
Nadav Har'El authored
Until now, lockfree::mutex functions were entirely inline, which won't fly if we want to make it our default mutex. Change them to be out-of-line, implemented in a new source file core/lfmutex.cc. This has a slight performance impact - uncontended lock/unlock pair used to be 17ns, and is now 22ns. In the future we can get this performance back by making these functions partially inline (the uncontended case inline, the waiting case in a separate function), although we'll need to consider the speed/code-size tradeoff.
Nadav Har'El authoredUntil now, lockfree::mutex functions were entirely inline, which won't fly if we want to make it our default mutex. Change them to be out-of-line, implemented in a new source file core/lfmutex.cc. This has a slight performance impact - uncontended lock/unlock pair used to be 17ns, and is now 22ns. In the future we can get this performance back by making these functions partially inline (the uncontended case inline, the waiting case in a separate function), although we'll need to consider the speed/code-size tradeoff.