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++ MT-multithreading and servers » StaticMutex/ONCELOCK question
Re: StaticMutex/ONCELOCK question [message #19940 is a reply to message #19928] Tue, 03 February 2009 20:28 Go to previous messageGo to previous message
Novo is currently offline  Novo
Messages: 1358
Registered: December 2006
Ultimate Contributor
luzr wrote on Tue, 03 February 2009 01:41


Do not get fooled by 3 'for' loops - these are just syntactic sugar to make ONCELOCK work on C statements and blocks - they in fact simulate the outer block



Thanks. I understand the idea with loops. I'm using similar technique to handle transactions myself.

What I do not understand is how uninitialized o_b_ works.

{
   static volatile bool o_b_;
   if(!ReadWithBarrier(o_b_)) {
       ...
   }
}




Regards,
Novo
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Previous Topic: HTTP Agent & WebSSL memory leak
Next Topic: Thread calls GUI
Goto Forum:
  


Current Time: Sun May 05 14:15:44 CEST 2024

Total time taken to generate the page: 0.03856 seconds