Files
rocm-systems/rocclr/compiler/lib/backends/common/sync.cpp
T
foreman 7168d24210 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
2015-03-19 20:50:35 -04:00

25 wiersze
418 B
C++

//
// 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