Group disabling of stdio locking code.
authorMilian Wolff <mail@milianw.de>
Mon, 15 Jun 2015 21:03:37 +0000 (23:03 +0200)
committerMilian Wolff <mail@milianw.de>
Mon, 15 Jun 2015 21:03:37 +0000 (23:03 +0200)
heaptrack_interpret.cpp

index 0d852be..1392b98 100644 (file)
@@ -333,6 +333,8 @@ int main(int /*argc*/, char** /*argv*/)
 {
     // optimize: we only have a single thread
     ios_base::sync_with_stdio(false);
+    __fsetlocking(stdout, FSETLOCKING_BYCALLER);
+    __fsetlocking(stdin, FSETLOCKING_BYCALLER);
 
     AccumulatedTraceData data;
 
@@ -340,9 +342,6 @@ int main(int /*argc*/, char** /*argv*/)
 
     string exe;
 
-    __fsetlocking(stdout, FSETLOCKING_BYCALLER);
-    __fsetlocking(stdin, FSETLOCKING_BYCALLER);
-
     while (reader.getLine(cin)) {
         if (reader.mode() == 'x') {
             reader >> exe;