Update of /cvsroot/boost/boost/boost/thread/win32
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12797

Modified Files:
      Tag: thread_rewrite
        read_write_mutex.hpp 
Log Message:
Updated tests for read_write_mutex, and fixed initialization of events


Index: read_write_mutex.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/thread/win32/Attic/read_write_mutex.hpp,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- read_write_mutex.hpp        5 Oct 2006 14:42:01 -0000       1.1.2.6
+++ read_write_mutex.hpp        17 Oct 2006 17:22:57 -0000      1.1.2.7
@@ -48,12 +48,21 @@
             return old_state;
         }
 
+        enum{
+            auto_reset=false,
+            manual_reset=true
+        };
+        enum{
+            initially_set=true,
+            initially_reset=false
+        };
+
     public:
         read_write_mutex():
             state(0),
-            shared_event(::boost::detail::CreateEventA(NULL,true,false,NULL)),
-            
exclusive_event(::boost::detail::CreateEventA(NULL,false,false,NULL)),
-            
upgradeable_event(::boost::detail::CreateEventA(NULL,false,true,NULL))
+            
shared_event(::boost::detail::CreateEventA(NULL,manual_reset,initially_set,NULL)),
+            
exclusive_event(::boost::detail::CreateEventA(NULL,auto_reset,initially_reset,NULL)),
+            
upgradeable_event(::boost::detail::CreateEventA(NULL,auto_reset,initially_set,NULL))
 
         {}
 
         ~read_write_mutex()
@@ -182,8 +191,6 @@
                     BOOST_ASSERT(success);
                 }
             }
-            bool const success=::boost::detail::ResetEvent(shared_event);
-            BOOST_ASSERT(success);
         }
 
         void unlock_upgradeable()


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to