
Hi, I search "spinlock" @boost.org, which turned up nothing. Anyone aware of such an implementation. Thanks in advance. Greg

From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Gregory Dai Sent: 02 February 2008 23:19 To: boost@lists.boost.org Subject: [boost] Mutex based on spinlock?
Hi,
I search "spinlock" @boost.org, which turned up nothing. Anyone aware of such an implementation.
Yes I am aware of an implementation. I have implemented a Spin Lock in boost style that I have not yet submitted, even to the vault. It is tested on Windows, but it should work on all platforms that support interlocked arithmetic operations. If there is interest I could submit this early version to the vault.
Thanks in advance. Greg
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Gregory Dai wrote:
I search "spinlock" @boost.org, which turned up nothing. Anyone aware of such an implementation.
A while ago I presented some benchmarks comparing different types of mutex including a spinlock. See e.g. http://thread.gmane.org/gmane.comp.lib.boost.devel/166875. My implementations at that time were just ad-hoc code for benchmarking. I've recently been turning it into something more useful and will post a message here about it soon. To make this cross-platform, we really need an implementation of atomics like e.g. N2427. Phil.

On Feb 3, 2008 5:20 AM, Phil Endecott <spam_from_boost_dev@chezphil.org> wrote:
Gregory Dai wrote:
I search "spinlock" @boost.org, which turned up nothing. Anyone aware of such an implementation.
A while ago I presented some benchmarks comparing different types of mutex including a spinlock. See e.g. http://thread.gmane.org/gmane.comp.lib.boost.devel/166875.
My implementations at that time were just ad-hoc code for benchmarking. I've recently been turning it into something more useful and will post a message here about it soon.
Your implementation posted on gmane.org is straightforward and efficient! How does it compare with your latest version? To make this cross-platform, we really need an implementation of
atomics like e.g. N2427.
Your impl. is Linux-based, while Neil's is Windows exclusive. Perhaps you could cooperate with Neil and come up with a joint contribution? Greg
participants (3)
-
Gregory Dai
-
Neil Groves
-
Phil Endecott