cvs commit: src/share/man/man9 Makefile condvar.9 lock.9 mi_switch.9 mtx_pool.9 mutex.9 rwlock.9 sleep.9 sleepqueue.9 sx.9 thread_exit.9 src/sys/kern kern_synch.c src/sys/sys mutex.h rwlock.h sleepqueue.h sx.h systm.h

John Baldwin jhb at FreeBSD.org
Fri Mar 9 22:41:02 UTC 2007


jhb         2007-03-09 22:41:01 UTC

  FreeBSD src repository

  Modified files:
    share/man/man9       Makefile condvar.9 lock.9 mi_switch.9 
                         mtx_pool.9 mutex.9 rwlock.9 sleep.9 
                         sleepqueue.9 sx.9 thread_exit.9 
    sys/kern             kern_synch.c 
    sys/sys              mutex.h rwlock.h sleepqueue.h sx.h 
                         systm.h 
  Log:
  Allow threads to atomically release rw and sx locks while waiting for an
  event.  Locking primitives that support this (mtx, rw, and sx) now each
  include their own foo_sleep() routine.
  - Rename msleep() to _sleep() and change it's 'struct mtx' object to a
    'struct lock_object' pointer.  _sleep() uses the recently added
    lc_unlock() and lc_lock() function pointers for the lock class of the
    specified lock to release the lock while the thread is suspended.
  - Add wrappers around _sleep() for mutexes (mtx_sleep()), rw locks
    (rw_sleep()), and sx locks (sx_sleep()).  msleep() still exists and
    is now identical to mtx_sleep(), but it is deprecated.
  - Rename SLEEPQ_MSLEEP to SLEEPQ_SLEEP.
  - Rewrite much of sleep.9 to not be msleep(9) centric.
  - Flesh out the 'RETURN VALUES' section in sleep.9 and add an 'ERRORS'
    section.
  - Add __nonnull(1) to _sleep() and msleep_spin() so that the compiler will
    warn if you try to pass a NULL wait channel.  The functions already have
    a KASSERT to that effect.
  
  Revision  Changes    Path
  1.300     +3 -0      src/share/man/man9/Makefile
  1.17      +1 -1      src/share/man/man9/condvar.9
  1.15      +4 -4      src/share/man/man9/lock.9
  1.20      +7 -6      src/share/man/man9/mi_switch.9
  1.7       +2 -3      src/share/man/man9/mtx_pool.9
  1.54      +13 -1     src/share/man/man9/mutex.9
  1.9       +10 -0     src/share/man/man9/rwlock.9
  1.59      +111 -68   src/share/man/man9/sleep.9
  1.15      +5 -5      src/share/man/man9/sleepqueue.9
  1.36      +11 -1     src/share/man/man9/sx.9
  1.3       +2 -2      src/share/man/man9/thread_exit.9
  1.292     +33 -28    src/sys/kern/kern_synch.c
  1.91      +3 -0      src/sys/sys/mutex.h
  1.9       +2 -0      src/sys/sys/rwlock.h
  1.11      +1 -1      src/sys/sys/sleepqueue.h
  1.27      +2 -0      src/sys/sys/sx.h
  1.252     +9 -4      src/sys/sys/systm.h


More information about the cvs-src mailing list