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 previous 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; }

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


Current Time: Mon Apr 28 05:09:54 CEST 2025

Total time taken to generate the page: 0.01011 seconds