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 » bug: AtomicXAdd for non win32, non-posix returns wrong value
bug: AtomicXAdd for non win32, non-posix returns wrong value [message #5062] Fri, 01 September 2006 19:47 Go to next message
hans is currently offline  hans
Messages: 44
Registered: March 2006
Location: Germany
Member
Function AtomicXAdd should return value before increment:

please change:
inline int  AtomicXAdd(volatile Atomic& t, int incr)  { Atomic x = t; t += incr; return t; }

to:
inline int  AtomicXAdd(volatile Atomic& t, int incr)  { Atomic x = t; t += incr; return x; }

Re: bug: AtomicXAdd for non win32, non-posix returns wrong value [message #5064 is a reply to message #5062] Sat, 02 September 2006 00:11 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Thanks!

Mirek
Previous Topic: encryption
Next Topic: Proposal: BinFindIndex should return 0 for empty container
Goto Forum:
  


Current Time: Sat May 04 22:54:40 CEST 2024

Total time taken to generate the page: 0.02136 seconds