|
| 1 | +/* |
| 2 | + * OpDiLib, an Open Multiprocessing Differentiation Library |
| 3 | + * |
| 4 | + * Copyright (C) 2020-2022 Chair for Scientific Computing (SciComp), TU Kaiserslautern |
| 5 | + * Copyright (C) 2023-2025 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau |
| 6 | + * Homepage: https://scicomp.rptu.de |
| 7 | + * Contact: Prof. Nicolas R. Gauger (opdi@scicomp.uni-kl.de) |
| 8 | + * |
| 9 | + * Lead developer: Johannes Blühdorn (SciComp, University of Kaiserslautern-Landau) |
| 10 | + * |
| 11 | + * This file is part of OpDiLib (https://scicomp.rptu.de/software/opdi). |
| 12 | + * |
| 13 | + * OpDiLib is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public |
| 14 | + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later |
| 15 | + * version. |
| 16 | + * |
| 17 | + * OpDiLib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 18 | + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
| 19 | + * details. |
| 20 | + * |
| 21 | + * You should have received a copy of the GNU Lesser General Public License along with OpDiLib. If not, see |
| 22 | + * <http://www.gnu.org/licenses/>. |
| 23 | + * |
| 24 | + */ |
| 25 | + |
| 26 | +#pragma once |
| 27 | + |
| 28 | +#ifdef __SANITIZE_THREAD__ |
| 29 | + #define ANNOTATE_RWLOCK_CREATE(lock) AnnotateRWLockCreate(__FILE__, __LINE__, (void*)lock) |
| 30 | + #define ANNOTATE_RWLOCK_DESTROY(lock) AnnotateRWLockDestroy(__FILE__, __LINE__, (void*)lock) |
| 31 | + #define ANNOTATE_RWLOCK_ACQUIRED(lock, isWrite) AnnotateRWLockAcquired(__FILE__, __LINE__, (void*)lock, isWrite) |
| 32 | + #define ANNOTATE_RWLOCK_RELEASED(lock, isWrite) AnnotateRWLockReleased(__FILE__, __LINE__, (void*)lock, isWrite) |
| 33 | + |
| 34 | + extern "C" void AnnotateRWLockCreate(const char* f, int l, void* addr); |
| 35 | + extern "C" void AnnotateRWLockDestroy(const char* f, int l, void* addr); |
| 36 | + extern "C" void AnnotateRWLockAcquired(const char* f, int l, void* addr, size_t isWrite); |
| 37 | + extern "C" void AnnotateRWLockReleased(const char* f, int l, void* addr, size_t isWrite); |
| 38 | +#endif |
0 commit comments