From owner-freebsd-arch Thu Oct 12 19:51:45 2000 Delivered-To: freebsd-arch@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id 1F2E637B502; Thu, 12 Oct 2000 19:51:43 -0700 (PDT) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id TAA27983; Thu, 12 Oct 2000 19:52:05 -0700 (MST) Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp05.primenet.com, id smtpdAAAxiaaF2; Thu Oct 12 19:51:57 2000 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id TAA03945; Thu, 12 Oct 2000 19:51:31 -0700 (MST) From: Terry Lambert Message-Id: <200010130251.TAA03945@usr05.primenet.com> Subject: Re: we need atomic_t To: bright@wintelcom.net (Alfred Perlstein) Date: Fri, 13 Oct 2000 02:51:31 +0000 (GMT) Cc: tlambert@primenet.com (Terry Lambert), cp@bsdi.com (Chuck Paterson), msmith@FreeBSD.ORG (Mike Smith), arch@FreeBSD.ORG In-Reply-To: <20001012192229.F272@fw.wintelcom.net> from "Alfred Perlstein" at Oct 12, 2000 07:22:29 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The reason for atomic_init/destroy is to intialize mutexes if they > are needed on the arch. Basically atomic64_t on 32bit arches would > be a struct with a 64bit value and a mutex to protect it. Tee hee hee. How do I initialize the mutex that protects the mutex? I think it's time to learn from the POSIX threads mutex implementation, wherein it is impossible to statically initialize a mutex, and to obtain that appearance, you have to trick the loader into doing the work using the section which is used for the construction of virtual base classes in C++ (see my modifications to the STL, as applied to the Moscow Center for Supercomuting Activites STL, which is the most up to date STL available). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message