Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2003 12:46:23 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/sys resourcevar.h
Message-ID:  <200310282046.h9SKkNcQ029699@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
jhb         2003/10/28 12:46:23 PST

  FreeBSD src repository

  Modified files:
    sys/sys              resourcevar.h 
  Log:
  According to the submitter, POSIX mandates that all interval timers are
  reset in a child process after a fork().  Currently, however, only the
  real timer is cleared while the virtual and profiling timers are inherited.
  
  The realtimer is cleared because it lives directly in struct proc in
  p_realtimer.  It is in the zero'd section of struct proc.  The other timers
  live in the p_timer[] array in struct pstats.  These timers are copied on
  fork() rather than zero'd.  The fix is to move p_timer[] to the zero'd
  part of struct pstats so that they are zero'd instead of copied on fork().
  
  Note: Since at least FreeBSD 2.0 (and possibly earlier) we've had storage
  for two real interval timers.  Now that the uarea is less important,
  perhaps we could move all of p_timer[] over to struct proc and drop the
  p_realtimer special case to fix that.
  
  PR:             kern/58647
  Reported by:    Dan Nelson <dnelson@allantgroup.com>
  MFC after:      1 week
  
  Revision  Changes    Path
  1.36      +2 -3      src/sys/sys/resourcevar.h



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