1//===-- amdgcn_locks.hip - AMDGCN OpenMP GPU lock implementation -- HIP -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
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
12// to take the lock.
13// These functions will be implemented to provide the documented semantics for
14// a SIMD => wavefront mapping once that is implemented.
15//
16//===----------------------------------------------------------------------===//
17
18#include "common/debug.h"
19
20static DEVICE void warn() {
21  PRINT0(LD_ALL, "Locks are not supported in this thread mapping model");
22}
23
24DEVICE void __kmpc_impl_init_lock(omp_lock_t *) { warn(); }
25DEVICE void __kmpc_impl_destroy_lock(omp_lock_t *) { warn(); }
26DEVICE void __kmpc_impl_set_lock(omp_lock_t *) { warn(); }
27DEVICE void __kmpc_impl_unset_lock(omp_lock_t *) { warn(); }
28DEVICE int __kmpc_impl_test_lock(omp_lock_t *lock) { warn(); }
29