Commit c6b69807 authored by Tat Dat Duong's avatar Tat Dat Duong
Browse files

chore: remove unnecessary printf

parent 56b6d1ed
Loading
Loading
Loading
Loading
+1 −22
Original line number Diff line number Diff line
@@ -18,15 +18,8 @@ struct BNodeLatch<BNode<KeyType, ValueType, Order>, Devices::Host> {
  void acquire(BTreeNode *node) {
    bool locked = true;

#ifdef DEBUG
    printf("Acquiring latch 0x%lx\n", (size_t)node);
#endif

    while (locked) {
      if (node->mWriteLock == false) {
#ifdef DEBUG
        printf("Acquired latch 0x%lx\n", (size_t)node);
#endif
        node->mWriteLock = true;
        break;
      }
@@ -34,26 +27,12 @@ struct BNodeLatch<BNode<KeyType, ValueType, Order>, Devices::Host> {
  }

  bool attempt(BTreeNode *node) {
#ifdef DEBUG
    printf("Attempting to latch 0x%lx\n", (size_t)node);
#endif
    if (node->mWriteLock == false) {
#ifdef DEBUG
      printf("Latched 0x%lx\n", (size_t)node);
#endif
      node->mWriteLock = true;
      return true;
    }
#ifdef DEBUG
    printf("Failed to latch 0x%lx\n", (size_t)node);
#endif
    return false;
  }

  void release(BTreeNode *node) {
#ifdef DEBUG
    printf("Releasing 0x%lx\n", (size_t)node);
#endif
    node->mWriteLock = false;
  }
  void release(BTreeNode *node) { node->mWriteLock = false; }
};