octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

src/ov.h; src/oc.cc: make static member thread-safe


From: CdeMills
Subject: src/ov.h; src/oc.cc: make static member thread-safe
Date: Wed, 19 Jan 2011 09:56:15 -0800 (PST)

Hello,

I include a patch to make the class octave_base_value thread-safe; meaning:
- making nil_ref a private static member
- adding a serializing mechanism if there is no support for gcc atomic ops
- initialising nil_ref and the mutex once
- rewriting all access to ref->count either as atomic, either as
mutex-protected. 

The issue is that, when dealing with octave_value::rep, it is not known if
it use the class-wide, default  octave_base_value object or a dynamically
allocated one.

'Octave' does compile, and all tests are OK with this patch applied. Could
other people review and test the impact on performances ?

Regards

Pascal

http://octave.1599824.n4.nabble.com/file/n3225433/ov.h.pat ov.h.pat 
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/src-ov-h-src-oc-cc-make-static-member-thread-safe-tp3225433p3225433.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]