Fixed refactoring bugs
[libcds.git] / cds / urcu / dispose_thread.h
index 5a8686fbd6b01d463e26e3abbcf827f034841cca..553a4d6b0e60f9c60e19b5726d432c7a8285b2bc 100644 (file)
@@ -1,12 +1,12 @@
 //$$CDS-header$$1
 
-#ifndef _CDS_URCU_DISPOSE_THREAD_H
-#define _CDS_URCU_DISPOSE_THREAD_H
+#ifndef CDSLIB_URCU_DISPOSE_THREAD_H
+#define CDSLIB_URCU_DISPOSE_THREAD_H
 
-#include <cds/details/std/thread.h>
-#include <cds/details/std/mutex.h>
-#include <cds/details/std/condition_variable.h>
-#include <cds/details/std/memory.h>     // unique_ptr
+#include <memory>
+#include <thread>
+#include <mutex>
+#include <condition_variable>
 #include <cds/details/aligned_type.h>
 
 namespace cds { namespace urcu {
@@ -26,10 +26,10 @@ namespace cds { namespace urcu {
         typedef Buffer  buffer_type ;   ///< Buffer type
     private:
         //@cond
-        typedef cds_std::thread                     thread_type;
-        typedef cds_std::mutex                      mutex_type;
-        typedef cds_std::condition_variable         condvar_type;
-        typedef cds_std::unique_lock< mutex_type >  unique_lock;
+        typedef std::thread                 thread_type;
+        typedef std::mutex              mutex_type;
+        typedef std::condition_variable condvar_type;
+        typedef std::unique_lock< mutex_type >  unique_lock;
 
         class dispose_thread_starter: public thread_type
         {
@@ -102,8 +102,9 @@ namespace cds { namespace urcu {
         {
             epoch_retired_ptr p;
             while ( pBuf->pop( p ) ) {
-                if ( p.m_nEpoch <= nCurEpoch )
+                if ( p.m_nEpoch <= nCurEpoch ) {
                     p.free();
+                }
                 else {
                     pBuf->push( p );
                     break;
@@ -195,4 +196,4 @@ namespace cds { namespace urcu {
     };
 }} // namespace cds::urcu
 
-#endif // #ifdef _CDS_URCU_DISPOSE_THREAD_H
+#endif // #ifdef CDSLIB_URCU_DISPOSE_THREAD_H