cvs commit: src/sys/kern subr_sleepqueue.c

John Baldwin jhb at FreeBSD.org
Thu May 13 13:00:44 PDT 2004


jhb         2004/05/13 13:00:43 PDT

  FreeBSD src repository

  Modified files:
    sys/kern             subr_sleepqueue.c 
  Log:
  Split sleepq_wakeup_thread() into two functions.  sleepq_remove_thread()
  removes a specific thread from a sleep queue.  sleepq_resume_thread()
  resumes scheduling of a thread that has been previously removed from a
  sleep queue.
  - sleepq_catch_signals() just removes a thread from the queue it was just
    added to when a pending signal is found.
  - sleepq_signal() and sleepq_broadcast() remove threads from a queue,
    drop the queue lock, and then resume all the previously removed threads.
    This doesn't completely fix the sched_lock <-> sleepq chain LOR, but it
    makes it a little better as we no longer call setrunnble() with a sleep
    queue lock held meaning if setrunnable() tries to wakeup the swapper we
    don't try to lock two sleep queue chains at the same time.
  
  Revision  Changes    Path
  1.6       +50 -13    src/sys/kern/subr_sleepqueue.c


More information about the cvs-all mailing list