1 //===-- amdgcn_locks.hip - AMDGCN OpenMP GPU lock implementation -- HIP -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // A 'thread' maps onto a lane of the wavefront. This means a per-thread lock
10 // cannot be implemented - if one thread gets the lock, it can't continue on to
11 // the next instruction in order to do anything as the other threads are waiting
13 // These functions will be implemented to provide the documented semantics for
14 // a SIMD => wavefront mapping once that is implemented.
16 //===----------------------------------------------------------------------===//
17 #pragma omp declare target
19 #include "common/debug.h"
22 PRINT0(LD_ALL, "Locks are not supported in this thread mapping model");
25 void __kmpc_impl_init_lock(omp_lock_t *) { warn(); }
26 void __kmpc_impl_destroy_lock(omp_lock_t *) { warn(); }
27 void __kmpc_impl_set_lock(omp_lock_t *) { warn(); }
28 void __kmpc_impl_unset_lock(omp_lock_t *) { warn(); }
29 int __kmpc_impl_test_lock(omp_lock_t *lock) {
34 #pragma omp end declare target