Explorar o código

refine glibc workaround

Samuel Thibault %!s(int64=10) %!d(string=hai) anos
pai
achega
df5628084d
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/core/disk_ops/unistd/disk_unistd_global.c

+ 2 - 2
src/core/disk_ops/unistd/disk_unistd_global.c

@@ -427,8 +427,8 @@ starpu_unistd_global_test_request(void * async_channel)
         const struct aiocb * aiocb = async_channel;
         int ret, error;
 
-#ifdef __GLIBC__
-        /* glibc's aio_error was not threadsafe at some point */
+#if defined(__GLIBC__) && !__GLIBC_PREREQ(2,22)
+        /* glibc's aio_error was not threadsafe before glibc 2.22 */
         struct timespec ts = { .tv_sec = 0, .tv_nsec = 0 };
         ret = aio_suspend(&aiocb, 1, &ts);
         error = errno;