• Marko Mäkelä's avatar
    MDEV-24167 fixup: Always derive srw_lock from rw_lock · 1fdc161d
    Marko Mäkelä authored
    Let us always base srw_lock on our own std::atomic<uint32_t>
    based rw_lock. In this way, we can extend the locks in a portable
    way across all platforms.
    
    We will use futex system calls where available:
    Linux, OpenBSD, and Microsoft Windows.
    
    Elsewhere, we will emulate futex with a mutex and a condition variable.
    
    Thanks to Daniel Black for testing this on OpenBSD.
    1fdc161d
srw_lock.h 3.93 KB