Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 May 2004 13:00:43 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern subr_sleepqueue.c
Message-ID:  <200405132000.i4DK0hS5046144@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405132000.i4DK0hS5046144>