about summary refs log tree commit diff
path: root/src/libutil/logging.cc
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2018-03-15T13·56+0100
committerGitHub <noreply@github.com>2018-03-15T13·56+0100
commit7b8914825a6b02173976eae0ca59053085d4b20a (patch)
treea913c0a57ea199dad59e4bb45a6f16f05941e797 /src/libutil/logging.cc
parentcfdbfa6b2cc27ae5b98c5f27599bbc0fc6a104c1 (diff)
parentbe54f4a0b6f160f8a2b0b9e9c988fb5251f70a97 (diff)
Merge pull request #1965 from masaeedu/master
Wrap thread local in function for Cygwin
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r--src/libutil/logging.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index c1cff5cf9061..e860b27d3d0b 100644
--- a/src/libutil/logging.cc
+++ b/src/libutil/logging.cc
@@ -6,7 +6,16 @@
 
 namespace nix {
 
-thread_local ActivityId curActivity = 0;
+static thread_local ActivityId curActivity = 0;
+
+ActivityId getCurActivity()
+{
+    return curActivity;
+}
+void setCurActivity(const ActivityId activityId)
+{
+    curActivity = activityId;
+}
 
 Logger * logger = makeDefaultLogger();