Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2000 02:51:31 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        bright@wintelcom.net (Alfred Perlstein)
Cc:        tlambert@primenet.com (Terry Lambert), cp@bsdi.com (Chuck Paterson), msmith@FreeBSD.ORG (Mike Smith), arch@FreeBSD.ORG
Subject:   Re: we need atomic_t
Message-ID:  <200010130251.TAA03945@usr05.primenet.com>
In-Reply-To: <20001012192229.F272@fw.wintelcom.net> from "Alfred Perlstein" at Oct 12, 2000 07:22:29 PM

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




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