From owner-freebsd-arch Thu Oct 5 13: 9:29 2000 Delivered-To: freebsd-arch@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id B6C9137B66D for ; Thu, 5 Oct 2000 13:09:26 -0700 (PDT) Received: from laptop.baldwin.cx (john@dhcp248.osd.bsdi.com [204.216.28.248]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e95K7Ai12482; Thu, 5 Oct 2000 13:07:11 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200010040750.e947oaH19391@netplex.com.au> Date: Thu, 05 Oct 2000 13:07:25 -0700 (PDT) From: John Baldwin To: Peter Wemm Subject: Re: Mutexes and semaphores Cc: Greg Lehey , Matt Dillon , Daniel Eischen , John Polstra , arch@FreeBSD.org, Alfred Perlstein , Chuck Paterson Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 04-Oct-00 Peter Wemm wrote: > 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). Darn it, review my barrier_foo() functions on the new-bus list so you can use that instead of a manual assembler mb(); :-P > Cheers, > -Peter -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message