diff options
author | 2019-05-08 23:35:23 +0000 | |
---|---|---|
committer | 2019-05-08 23:35:23 +0000 | |
commit | e45ba1fb39ca56dfb6a05db47bcbf06d753f6a30 (patch) | |
tree | 3db99bfe78d0c8a17902cd59ee1f4e76c3f22abd | |
parent | Move the magic ping6 IPv6 default router discovery so we probe all (diff) | |
download | wireguard-openbsd-e45ba1fb39ca56dfb6a05db47bcbf06d753f6a30.tar.xz wireguard-openbsd-e45ba1fb39ca56dfb6a05db47bcbf06d753f6a30.zip |
Add wait_event_killable(). In linux TASK_KILLABLE only gets fatal
signals, as we don't have an equivalent use PCATCH and check for all
signals before and after msleep. Discussed with kettenis@.
-rw-r--r-- | sys/dev/pci/drm/include/linux/wait.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/include/linux/wait.h b/sys/dev/pci/drm/include/linux/wait.h index f69a1c91a10..5860e906a5c 100644 --- a/sys/dev/pci/drm/include/linux/wait.h +++ b/sys/dev/pci/drm/include/linux/wait.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wait.h,v 1.3 2019/05/01 07:22:24 jsg Exp $ */ +/* $OpenBSD: wait.h,v 1.4 2019/05/08 23:35:23 jsg Exp $ */ /* * Copyright (c) 2013, 2014, 2015 Mark Kettenis * Copyright (c) 2017 Martin Pieuchot @@ -146,6 +146,12 @@ do { \ __wait_event_intr_timeout(wq, condition, 0, 0); \ } while (0) +#define wait_event_killable(wq, condition) \ +do { \ + if (!(condition)) \ + __wait_event_intr_timeout(wq, condition, 0, PCATCH); \ +} while (0) + #define wait_event_interruptible(wq, condition) \ ({ \ int __ret = 0; \ |