cvs commit: src/sys/kern kern_resource.c

Bruce Evans bde at FreeBSD.org
Mon Jun 21 21:38:09 PDT 2004


bde         2004-06-22 04:38:08 UTC

  FreeBSD src repository

  Modified files:        (Branch: RELENG_4)
    sys/kern             kern_resource.c 
  Log:
  Raise the ipl to splstatclock() in donice() before calling resetpriority().
  This fixes races with schedcpu() and schedclock().  It corresponds to
  sched locking before the sched_nice() call in -current.  Lock assertions
  made the races very obvious in -current.
  
  Adjust the process's priority after calling resetpriority() as in
  schedclock() to maintain the invariant that the current priority is
  always _the_ process's user priority if it is a user priority.  This
  is to support uncommitted assertions that the priority is correct on
  return to user mode.  The priority is correct here (modulo bugs
  elsewhere) but it needs to be set explicitly to satisfy the assertions.
  
  Revision  Changes    Path
  1.55.2.6  +5 -0      src/sys/kern/kern_resource.c


More information about the cvs-src mailing list