cvs commit: src/sys/kern kern_fork.c kern_synch.c

Bruce Evans bde at FreeBSD.org
Wed Oct 29 07:23:11 PST 2003


bde         2003/10/29 07:23:09 PST

  FreeBSD src repository

  Modified files:
    sys/kern             kern_fork.c kern_synch.c 
  Log:
  Removed mostly-dead code for setting switchtime after the idle loop
  clobbers this variable.  Long ago, when the idle loop wasn't in a
  process, it set switchtime.tv_sec to zero to indicate that the time
  needs to be read after the idle loop finishes.  The special case for
  this isn't needed now that there is an idle process (for each CPU).
  The time is read in the normal way when the idle process is switched
  away from.  The seconds component of the time is only zero for the
  first second after the uptime is set, and the mostly-dead code was only
  executed during this time.  (This was slightly broken by using uptimes
  instead of times relative to the Epoch -- in the original version the
  seconds component of the time was only 0 for the first second after
  the Epoch.)
  
  In mi_switch(), moved the setting of switchticks to just after the
  first (and now only) setting of switchtime.  This setting used to be
  delayed since a late setting was needed for the idle case and an early
  setting was not needed.  Now the early setting is needed so that
  fork_exit() doesn't need to set either switchtime or switchticks.
  Removed now-completely-rotted comment attached to this.  Most of the
  code described by the comment had already moved to sched_switch().
  
  Revision  Changes    Path
  1.208     +0 -3      src/sys/kern/kern_fork.c
  1.237     +2 -8      src/sys/kern/kern_synch.c


More information about the cvs-src mailing list