|
Boost : |
From: Rainer Deyke (root_at_[hidden])
Date: 2001-11-29 16:36:48
----- Original Message -----
From: "Mac Murrett" <mmurrett_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, November 29, 2001 1:27 PM
Subject: Re: [boost] Re: detail::atomic_counter
> template<>
> void increment_atomic<long>(long &rValue)
> {
> InterlockedIncrement(&rValue);
> }
>
> And then a general case. I do not believe that the general case can be
made
> to be suitably efficient and friendly, however, as it will require either
a
> mutex parameter or a map look-up, or possibly a mutex parameter that
> defaults to a map look-up.
Or a single static mutex. That would prevent recursive calls to
'increment_atomic', but I consider that an acceptable sacrifice.
-- Rainer Deyke (root_at_[hidden]) Shareware computer games - http://rainerdeyke.com "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk