Pārlūkot izejas kodu

Add a method to MPCTIO to get the current thread_lamport value

This is useful for performance debugging
Ian Goldberg 2 gadi atpakaļ
vecāks
revīzija
1d05a02c11
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      mpcio.hpp

+ 5 - 0
mpcio.hpp

@@ -381,6 +381,11 @@ public:
     // run.
     void reset_lamport();
 
+    // Read the thread_lamport counter, for performance debugging
+    lamport_t get_thread_lamport() {
+        return thread_lamport;
+    }
+
     // The normal case, where the MPCIO is created inside the thread,
     // and so destructed when the thread ends, is handled automatically
     // here.