P4 to Git Change 1132635 by smekhano@stas-rampitec-hsa on 2015/03/19 17:27:36
ECR #333753 - part of the changes to use llvm 3.6
Testing: smoke, precheckin
Reviewed by Brian Sumner
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/api/v0_8/acl.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#122 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/sync.cpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/sync.hpp#1 add
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/v0_8/if_acl.cpp#63 edit
[ROCm/clr commit: 7168d24210]
Этот коммит содержится в:
1 родитель
73d2e22993
Коммит
ae3a15d331
4 files changed
+42
-6
No files matched your search
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright (c) 2008 Advanced Micro Devices, Inc. All rights reserved.
|
||||
//
|
||||
#include "sync.hpp"
|
||||
#include "llvm/Support/Mutex.h"
|
||||
#include "llvm/Support/Threading.h"
|
||||
|
||||
|
||||
static llvm::sys::MutexImpl mtx;
|
||||
|
||||
namespace amdcl
|
||||
{
|
||||
|
||||
void acquire_global_lock() {
|
||||
if (llvm::llvm_is_multithreaded())
|
||||
mtx.acquire();
|
||||
}
|
||||
|
||||
void release_global_lock() {
|
||||
if (llvm::llvm_is_multithreaded())
|
||||
mtx.release();
|
||||
}
|
||||
|
||||
} // namespace amdcl
|
||||
Reference in new issue
Block a user