Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 04 Oct 2000 00:50:36 -0700
From:      Peter Wemm <peter@netplex.com.au>
To:        Chuck Paterson <cp@bsdi.com>
Cc:        Alfred Perlstein <bright@wintelcom.net>, John Baldwin <jhb@FreeBSD.ORG>, arch@FreeBSD.ORG, John Polstra <jdp@polstra.com>, Daniel Eischen <eischen@vigrid.com>, Matt Dillon <dillon@earth.backplane.com>, Greg Lehey <grog@lemis.com>
Subject:   Re: Mutexes and semaphores 
Message-ID:  <200010040750.e947oaH19391@netplex.com.au>
In-Reply-To: <200010040727.e947RpH19302@netplex.com.au> 

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Wemm wrote:
> Chuck Paterson wrote:
> > Your right, not freeing these things ever does make things
> > lots easier.
> > 
> > Chuck
> 
> In the freebsd case, this is the case.  Zones are never cleaned up, and
> certainly not unmapped.  zfree() will however cause the first few bytes
> to be clobbered as they are reused for the freelist.

Actually, a final version is at:
  http://people.freebsd.org/~peter/getppid.diff

This produces nice tight assembler code.  The SMP reentrancy protection
adds two instructions.. one cmp and one conditional branch which gets taken
if there is a lost race.  It hardly seems worth #ifdef'ing it (and it isn't
ifdefed in the diff).  This diff is missing is the MPSAFE flag for the
getppid syscall, but thats trivial to add (for native syscalls and all other
syscall vectors that call getppid directly).

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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