[3.13] gh-117657: Avoid sem_clockwait in TSAN (GH-119915) (#119992)

The `sem_clockwait` function is not currently instrumented, which leads
to false positives.
(cherry picked from commit 41c1cefbae)

Co-authored-by: Sam Gross <colesbury@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-06-03 20:07:22 +02:00 committed by GitHub
parent 6b10467fbc
commit ca37034baa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 10 deletions

View file

@ -119,7 +119,7 @@ _PySemaphore_PlatformWait(_PySemaphore *sema, PyTime_t timeout)
if (timeout >= 0) {
struct timespec ts;
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT)
#if defined(CLOCK_MONOTONIC) && defined(HAVE_SEM_CLOCKWAIT) && !defined(_Py_THREAD_SANITIZER)
PyTime_t now;
// silently ignore error: cannot report error to the caller
(void)PyTime_MonotonicRaw(&now);