artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
26bd93c
)
add msleep_interruptible()
author
jsg
<jsg@openbsd.org>
Fri, 7 Oct 2022 03:09:26 +0000
(
03:09
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 7 Oct 2022 03:09:26 +0000
(
03:09
+0000)
sys/dev/pci/drm/include/linux/delay.h
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/include/linux/delay.h
b/sys/dev/pci/drm/include/linux/delay.h
index
13433ea
..
3a48c04
100644
(file)
--- a/
sys/dev/pci/drm/include/linux/delay.h
+++ b/
sys/dev/pci/drm/include/linux/delay.h
@@
-34,4
+34,14
@@
mdelay(unsigned long msecs)
#define drm_msleep(x) mdelay(x)
+static inline unsigned int
+msleep_interruptible(unsigned int msecs)
+{
+ int r = tsleep_nsec(&nowake, PWAIT|PCATCH, "msleepi",
+ MSEC_TO_NSEC(msecs));
+ if (r == EINTR)
+ return 1;
+ return 0;
+}
+
#endif