Skip to content
Snippets Groups Projects
  • Glauber Costa's avatar
    29d05537
    bsd: stubs for sx_xlock · 29d05537
    Glauber Costa authored
    Aside from mutex, BSD always implements sx locks. They are a form of rwlock,
    and according to BSD's sx.h, the differences from their own rwlock are an
    implementation detail. Let's just use them as rwlocks for now.
    
    The declarations are uglier than I wanted. But this file ends up being included
    from c and cc code, and rwlock.h calls condvar.h inside - which is full of
    sync_stub.h - and as a result condvar.h itself - are usually included in extern
    "C" blocks. Because we are not expected to use sxlocks from C, it should be
    fine.
    29d05537
    History
    bsd: stubs for sx_xlock
    Glauber Costa authored
    Aside from mutex, BSD always implements sx locks. They are a form of rwlock,
    and according to BSD's sx.h, the differences from their own rwlock are an
    implementation detail. Let's just use them as rwlocks for now.
    
    The declarations are uglier than I wanted. But this file ends up being included
    from c and cc code, and rwlock.h calls condvar.h inside - which is full of
    sync_stub.h - and as a result condvar.h itself - are usually included in extern
    "C" blocks. Because we are not expected to use sxlocks from C, it should be
    fine.