Takes out backoff in misc data structures
[libcds.git] / cds / misc / rwlock.h
index e8c6465..a1f8771 100644 (file)
@@ -31,12 +31,12 @@ public:
   }
 
   void read_lock() {
-    ExpBackoff backoff;
+//    ExpBackoff backoff;
     int priorvalue = atomic_fetch_sub_explicit(&lock, 1, memory_order_acquire);
     while (priorvalue <= 0) {
       atomic_fetch_add_explicit(&lock, 1, memory_order_relaxed);
       while (atomic_load_explicit(&lock, memory_order_relaxed) <= 0) {
-        backoff();
+//        backoff();
       }
       priorvalue = atomic_fetch_sub_explicit(&lock, 1, memory_order_acquire);
     }
@@ -45,12 +45,12 @@ public:
   void write_lock() {
     int priorvalue =
         atomic_fetch_sub_explicit(&lock, RW_LOCK_BIAS, memory_order_acquire);
-    ExpBackoff backoff;
+//    ExpBackoff backoff;
     while (priorvalue != RW_LOCK_BIAS) {
       atomic_fetch_add_explicit(&lock, RW_LOCK_BIAS, memory_order_relaxed);
       while (atomic_load_explicit(&lock, memory_order_relaxed) !=
              RW_LOCK_BIAS) {
-        backoff();
+//        backoff();
       }
       priorvalue =
           atomic_fetch_sub_explicit(&lock, RW_LOCK_BIAS, memory_order_acquire);