Boost logo

Boost-Commit :

From: anthony_at_[hidden]
Date: 2007-10-08 11:44:13


Author: anthonyw
Date: 2007-10-08 11:44:13 EDT (Mon, 08 Oct 2007)
New Revision: 39785
URL: http://svn.boost.org/trac/boost/changeset/39785

Log:
added backwards-compatibility overload for call_once
Text files modified:
   trunk/boost/thread/once.hpp | 19 +++++++------------
   1 files changed, 7 insertions(+), 12 deletions(-)

Modified: trunk/boost/thread/once.hpp
==============================================================================
--- trunk/boost/thread/once.hpp (original)
+++ trunk/boost/thread/once.hpp 2007-10-08 11:44:13 EDT (Mon, 08 Oct 2007)
@@ -10,19 +10,14 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 
 #include <boost/thread/detail/platform.hpp>
-#ifdef BOOST_HAS_MPTASKS
-namespace boost {
-
-typedef long once_flag;
-#define BOOST_ONCE_INIT 0
-
-void call_once(once_flag& flag, void (*func)());
-
-}
-
-#else
 #include BOOST_THREAD_PLATFORM(once.hpp)
-#endif
 
+namespace boost
+{
+ inline void call_once(void (*func)(),once_flag& flag)
+ {
+ call_once(flag,func);
+ }
+}
 
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk