X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Fwait.h;h=6cc0e3732cec710133000d9d9dfd15b6556d1938;hb=HEAD;hp=0af1f104b7fde63e6515591a910bc657fbb90495;hpb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;p=lttng-ust.git diff --git a/liblttng-ust/wait.h b/liblttng-ust/wait.h deleted file mode 100644 index 0af1f104..00000000 --- a/liblttng-ust/wait.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SPDX-License-Identifier: LGPL-2.1-only - * - * Copyright (C) 2011 Mathieu Desnoyers - */ - -#ifndef _UST_WAIT_H -#define _UST_WAIT_H - -#include - -/* - * 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 */