From a81495d6f4a71980b51cc3099f8cd76885cdcb13 Mon Sep 17 00:00:00 2001 From: minqiyang Date: Thu, 13 Dec 2018 18:45:20 +0800 Subject: [PATCH] Fix code --- paddle/fluid/framework/scope.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/scope.cc b/paddle/fluid/framework/scope.cc index f05208c5e..d2856a07a 100644 --- a/paddle/fluid/framework/scope.cc +++ b/paddle/fluid/framework/scope.cc @@ -19,6 +19,7 @@ limitations under the License. */ #include #include #include "glog/logging.h" +#include "paddle/fluid/framework/threadpool.h" #include "paddle/fluid/string/printf.h" DEFINE_bool(benchmark, false, @@ -47,10 +48,10 @@ DEFINE_double( #define SCOPE_VARS_READER_LOCK #define SCOPE_VARS_WRITER_LOCK #else -#define SCOPE_KIDS_READER_LOCK AutoRDLock(&kids_lock_); -#define SCOPE_KIDS_WRITER_LOCK AutoWRLock(&kids_lock_); -#define SCOPE_VARS_READER_LOCK AutoRDLock(&vars_lock_); -#define SCOPE_VARS_WRITER_LOCK AutoWRLock(&vars_lock_); +#define SCOPE_KIDS_READER_LOCK AutoRDLock auto_lock(&kids_lock_); +#define SCOPE_KIDS_WRITER_LOCK AutoWRLock auto_lock(&kids_lock_); +#define SCOPE_VARS_READER_LOCK AutoRDLock auto_lock(&vars_lock_); +#define SCOPE_VARS_WRITER_LOCK AutoWRLock auto_lock(&vars_lock_); #endif namespace paddle { -- GitLab