Subject: Re: [Boost-bugs] [Boost C++ Libraries] #5331: usage of deprecated swp instruction on arm
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-01-19 10:12:53
#5331: usage of deprecated swp instruction on arm
----------------------------------------------------------+-----------------
Reporter: Boaz Ben-David <boaz.bd@â¦> | Owner: pdimov
Type: Bugs | Status: new
Milestone: To Be Determined | Component: smart_ptr
Version: Boost 1.46.0 | Severity: Problem
Resolution: | Keywords: arm deprecated
----------------------------------------------------------+-----------------
Comment (by abel@â¦):
Hi,
I'm not sure if this is still on the agenda or not. However, I had to fix
this specific problem earlier this year. I followed the outline given at
http://www.boost.org/support/bugs.html to produce the attached patch
against the latest trunk.
The patch should take care of deprecation warnings.
The latest trunk introduced a memory barrier after the swp instructiopn.
However, I think using a memory barrier is only ever necessary when the
lock was actually acquired. Yet, the trunk codebase sets one up on each
call of try_lock()... This might have some performance implications.
As of right now, try_lock() is called in lock() inside a loop which
explicitly yields the thread if try_lock() failed. It might be better to
have that loop in try_lock() instead and only do a dmb if the lock was
acquired. However, this might change the API in more ways than most people
would be comfortable with, I guess...
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5331#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:08 UTC