Home » U++ Library support » U++ Core » Why ReadWithBarrier returns bool (current svn)
Why ReadWithBarrier returns bool (current svn) [message #15734] |
Tue, 06 May 2008 20:31  |
hans
Messages: 44 Registered: March 2006 Location: Germany
|
Member |
|
|
Hi, we have
template <class U>
inline bool ReadWithBarrier(const volatile U& b)
{
volatile bool tmp = b;
ReadMemoryBarrier();
return tmp;
}
but use it as it would return an int too, like in
inline int AtomicRead(const volatile Atomic& t) { return ReadWithBarrier(t); }
So I would suggest to replace in ReadWithBarrier the bool with the U template parameter (in tmp var and return type).
Cheers, Hans.
|
|
|
Goto Forum:
Current Time: Sun May 04 01:52:24 CEST 2025
Total time taken to generate the page: 0.03637 seconds
|