Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
hans is currently offline  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.
 
Read Message
Read Message
Read Message
Previous Topic: How to re-initialize random generator?
Next Topic: U++ core app as DLL: memory manager problems?
Goto Forum:
  


Current Time: Thu May 09 09:38:43 CEST 2024

Total time taken to generate the page: 0.02587 seconds