A single fix for rt_mutex:

  The deadlock detection code drops into an infinite scheduling loop while
  still holding rt_mutex::wait_lock, which rightfully triggers a
  'scheduling in atomic' warning. Unlock it before that.