[CLN-list] thread-safety for CLN

Richard B. Kreckel kreckel at ginac.de
Wed Nov 22 23:01:10 CET 2006


Bruno Haible wrote:

>You could probably easily replace this with atomic increments and decrements;
>it's centralized in the three methods
>  cl_inc_pointer_refcount
>  cl_gc_dec_pointer_refcount
>  cl_rc_dec_pointer_refcount
>in include/cln/object.h. It will need a few CPU specific asms in order to
>be efficient.
>  
>

I would love to know whether this results in performance degrading 
noticably. If the numbers in 
<http://gcc.gnu.org/ml/libstdc++/2005-11/msg00099.html> are correct, 
then it probably won't. However, if the numbers in the post quoted there 
are correct, then it might make sense to provide a way to turn atomic 
operations off at configuration time. Apart from that, I'm all in favor 
of Kort Travis' effort.

  -richy.

-- 
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>



More information about the CLN-list mailing list