Peter Lemenkov wrote:
2010/10/18 Stefan Sayer <[email protected]>:
Hi,
"
In file included from resolver.h:34,
from sip_parser.h:35,
from trans_table.cpp:32:
../atomic_types.h:26:2: warning: #warning Compare and Swap is not supported
on this architecture "
is this true for ARCH=x86 OS=linux gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu9)
?
I'd rather to trust compiler's messages :). Unfortunately, that's not
yes, I do :) was actually wondering whether the tests for presence of
atomic functions in atomic_types.h are correct.
if yes, is it worth a warning?
Yes, definitely - because we added a workaround for this and
(teoretically) workaround may (or may not) slow down system a bit.
looks to me that there's not much one can portably do if gcc atomic
builtins are not present (and we don't want to use glib, intel tbb or
the like) - and as every DNS entry has its own lock, usually it looks
like the performance penalty will be two cache flushes (pthread lock +
unlock) instead of one (lock incx), which doesn't look like very
expensive. so, I'm not sure whether it makes sense to print a compiler
warning if there is nothing the user can do to make it faster.
on the other hand, there is these functions, which look pretty simple,
maybe we could just add those:
http://www.boost.org/doc/libs/1_39_0/boost/interprocess/detail/atomic.hpp
Stefan
--
Stefan Sayer
VoIP Services Consulting and Development
Warschauer Str. 24
10243 Berlin
tel:+491621366449
sip:[email protected]
email/xmpp:[email protected]
_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev