]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/smart_ptr/detail/lwm_win32_cs.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / smart_ptr / detail / lwm_win32_cs.hpp
index 25b1f195b74c026ffed72fc1971dccab3e48d443..d8dccb0141b3b047fc812654f686ca7e1081f579 100644 (file)
@@ -61,7 +61,9 @@ extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRIT
 extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
 extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
 
-#else
+typedef ::_RTL_CRITICAL_SECTION rtl_critical_section;
+
+#else // #ifndef BOOST_USE_WINDOWS_H
 
 typedef ::CRITICAL_SECTION critical_section;
 
@@ -74,6 +76,8 @@ using ::EnterCriticalSection;
 using ::LeaveCriticalSection;
 using ::DeleteCriticalSection;
 
+typedef ::CRITICAL_SECTION rtl_critical_section;
+
 #endif // #ifndef BOOST_USE_WINDOWS_H
 
 class lightweight_mutex
@@ -90,15 +94,15 @@ public:
     lightweight_mutex()
     {
 #if BOOST_PLAT_WINDOWS_RUNTIME
-        boost::detail::InitializeCriticalSectionEx(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_), 4000, 0);
+        boost::detail::InitializeCriticalSectionEx(reinterpret_cast< rtl_critical_section* >(&cs_), 4000, 0);
 #else
-        boost::detail::InitializeCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_));
+        boost::detail::InitializeCriticalSection(reinterpret_cast< rtl_critical_section* >(&cs_));
 #endif
     }
 
     ~lightweight_mutex()
     {
-        boost::detail::DeleteCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&cs_));
+        boost::detail::DeleteCriticalSection(reinterpret_cast< rtl_critical_section* >(&cs_));
     }
 
     class scoped_lock;
@@ -117,12 +121,12 @@ public:
 
         explicit scoped_lock(lightweight_mutex & m): m_(m)
         {
-            boost::detail::EnterCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_));
+            boost::detail::EnterCriticalSection(reinterpret_cast< rtl_critical_section* >(&m_.cs_));
         }
 
         ~scoped_lock()
         {
-            boost::detail::LeaveCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_.cs_));
+            boost::detail::LeaveCriticalSection(reinterpret_cast< rtl_critical_section* >(&m_.cs_));
         }
     };
 };