Find a faster way to get currently executing thread's id
[c11tester.git] / datarace.cc
index da5fa8ce6ea6434ebacf0201e36f44cbba376d7b..06de537546d90ca63f73d86e25fa747e5e5288eb 100644 (file)
@@ -500,7 +500,7 @@ void recordWrite(thread_id_t thread, void *location) {
 
 /** This function just updates metadata on atomic write. */
 void recordCalloc(void *location, size_t size) {
 
 /** This function just updates metadata on atomic write. */
 void recordCalloc(void *location, size_t size) {
-       thread_id_t thread = thread_current()->get_id();
+       thread_id_t thread = thread_current_id();
        for(;size != 0;size--) {
                uint64_t *shadow = lookupAddressEntry(location);
                uint64_t shadowval = *shadow;
        for(;size != 0;size--) {
                uint64_t *shadow = lookupAddressEntry(location);
                uint64_t shadowval = *shadow;