Skip to content
  • Philippe Gerum's avatar
    cobalt/mutex, lib/cobalt: detect attempts to sleep while holding a mutex · e3153cf2
    Philippe Gerum authored
    Going to sleep intentionally while holding a mutex is an application
    issue. When user consistency checks are enabled (XENO_OPT_DEBUG_USER),
    any attempt to do so will trigger a SIGDEBUG signal to the offending
    thread, conveying the SIGDEBUG_RESCNT_SLEEP code.
    
    This change implicitly disables fast locking optimizations for
    user-space threads when XENO_OPT_DEBUG_USER is enabled. Since the
    debugging code present or future may already add some overhead, this
    seems acceptable anyway.
    e3153cf2