Fix: handle sys_futex EINTR and EWOULDBLOCK
[lttng-ust.git] / tests / ust-basic-tracing / ust-basic-tracing.c
index 7bfeb5bc540f7037a15a8a61976f0a2ebbfcc2ef..cc0fb89b65721fb9fb4329cdae07e2c23b74a604 100644 (file)
@@ -659,8 +659,11 @@ int update_futex(int fd, int active)
 
        if (active) {
                uatomic_set((int32_t *) wait_shm_mmap, 1);
-               futex_async((int32_t *) wait_shm_mmap, FUTEX_WAKE,
-                               INT_MAX, NULL, NULL, 0);
+               if (futex_async((int32_t *) wait_shm_mmap, FUTEX_WAKE,
+                               INT_MAX, NULL, NULL, 0) < 0) {
+                       perror("futex_async");
+                       goto error;
+               }
        } else {
                uatomic_set((int32_t *) wait_shm_mmap, 0);
        }
This page took 0.02419 seconds and 4 git commands to generate.