From owner-freebsd-arch Fri Oct 13 20:12:24 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 5A4BD37B66F; Fri, 13 Oct 2000 20:12:22 -0700 (PDT) Received: from laptop.baldwin.cx (ether.osd.bsdi.com [204.216.28.196]) by pike.osd.bsdi.com (8.11.0/8.9.3) with ESMTP id e9E3C8538927; Fri, 13 Oct 2000 20:12:09 -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: <200010130251.TAA03945@usr05.primenet.com> Date: Fri, 13 Oct 2000 20:12:28 -0700 (PDT) From: John Baldwin To: Terry Lambert Subject: Re: we need atomic_t Cc: arch@FreeBSD.org, (Mike Smith) , (Chuck Paterson) , (Alfred Perlstein) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 13-Oct-00 Terry Lambert wrote: >> 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? Our mutexes use a pointer for the lock, so they use uintptr_t, not the would-be atomic_t. The reason for an atomic_t really is to provide a cheap way to do MP safe refcounts, etc. w/o having to use mutexes if at all possible. -- 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