Move all sources to 'src/'
[lttng-ust.git] / liblttng-ust / wait.h
diff --git a/liblttng-ust/wait.h b/liblttng-ust/wait.h
deleted file mode 100644 (file)
index 0af1f10..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * SPDX-License-Identifier: LGPL-2.1-only
- *
- * Copyright (C) 2011 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _UST_WAIT_H
-#define _UST_WAIT_H
-
-#include <poll.h>
-
-/*
- * Wait until "cond" gets true or timeout (in ms).
- */
-#define wait_cond_interruptible_timeout(_cond, _timeout)       \
-       ({                                                      \
-               int __ret = 0, __pollret;                       \
-               int __timeout = _timeout;                       \
-                                                               \
-               for (;;) {                                      \
-                       if (_cond)                              \
-                               break;                          \
-                       if (__timeout <= 0) {                   \
-                               __ret = -ETIMEDOUT;             \
-                               break;                          \
-                       }                                       \
-                       __pollret = poll(NULL, 0, 10);  /* wait 10ms */ \
-                       if (__pollret < 0) {                    \
-                               __ret = -errno;                 \
-                               break;                          \
-                       }                                       \
-                       __timeout -= 10;                        \
-               }                                               \
-               __ret;                                          \
-       })
-
-
-#endif /* _UST_WAIT_H */
This page took 0.023266 seconds and 4 git commands to generate.