Skip to content
  • Rémi Denis-Courmont's avatar
    misc: better lock assertion back-end · ff7544ed
    Rémi Denis-Courmont authored
    This tracks the locks manually, which is a lot slower but compared
    to the existing vlc_assert_locked():
     - The performance is not a major problem in debug builds.
     - Assertion can be made that a mutex is _not_ locked.
     - The state of a static mutex can be asserted.
     - The implementation is not POSIX-specific.
     - The pointed to the asserted lock is properly const.
     - The implementation does not trip valgrind.
     - The implementation will not trip sanitizers.
    
    Also the implementation is still lock-free and thread-safe.
    ff7544ed