linux/compat.h: Add wait_event_timeout macro

Add  wait_event_timeout - sleep until a condition gets true or a
timeout elapses.

This is a stripped version of the same from Linux kernel with the
following u-boot specific modifications:
- no wait queues supported
- use u-boot timer to detect timeouts
- check for Ctrl-C pressed during wait

Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
Signed-off-by: Anastasiia Lukianenko <anastasiia_lukianenko@epam.com>
[trini: Drop atomic_read from gadget/ether.c as this has existed for a
        while and now causes problems]
Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Oleksandr Andrushchenko
2020-08-06 12:42:51 +03:00
committed by Tom Rini
parent 384d5cfe5d
commit 242587dca4
2 changed files with 54 additions and 1 deletions

View File

@@ -33,7 +33,6 @@
#define USB_NET_NAME "usb_ether"
#define atomic_read
extern struct platform_data brd;