Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174339899
D57579.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57579.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/delay.h b/sys/compat/linuxkpi/common/include/linux/delay.h
--- a/sys/compat/linuxkpi/common/include/linux/delay.h
+++ b/sys/compat/linuxkpi/common/include/linux/delay.h
@@ -30,7 +30,10 @@
#ifndef _LINUXKPI_LINUX_DELAY_H_
#define _LINUXKPI_LINUX_DELAY_H_
+#include <linux/math.h>
+#include <linux/sched.h>
#include <linux/jiffies.h>
+
#include <sys/systm.h>
static inline void
@@ -64,14 +67,23 @@
}
static inline void
-usleep_range(unsigned long min, unsigned long max)
+usleep_range_state(unsigned long min, unsigned long max, unsigned int state)
{
+ KASSERT(state == TASK_UNINTERRUPTIBLE, ("%s: state=%d unsupported\n",
+ __func__, state));
+
/* guard against invalid values */
if (min == 0)
min = 1;
pause_sbt("lnxsleep", ustosbt(min), 0, C_HARDCLOCK);
}
+static inline void
+usleep_range(unsigned long min, unsigned long max)
+{
+ usleep_range_state(min, max, TASK_UNINTERRUPTIBLE);
+}
+
extern unsigned int linux_msleep_interruptible(unsigned int ms);
static inline void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Oct 3, 1:00 PM (13 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33966416
Default Alt Text
D57579.diff (1 KB)
Attached To
Mode
D57579: linuxkpi: Add `usleep_range_state()`
Attached
Detach File
Event Timeline
Log In to Comment