Use mstosbt() instead of SBT_1MS in the LinuxKPI to get the last few bits
of precision. MFC after: 1 week Suggested by: ian@ Sponsored by: Mellanox Technologies
This commit is contained in:
parent
7cf1c51588
commit
ccae7bb851
@ -41,7 +41,7 @@ linux_msleep(unsigned int ms)
|
||||
/* guard against invalid values */
|
||||
if (ms == 0)
|
||||
ms = 1;
|
||||
pause_sbt("lnxsleep", SBT_1MS * ms, 0, C_HARDCLOCK);
|
||||
pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK);
|
||||
}
|
||||
|
||||
#undef msleep
|
||||
|
@ -83,7 +83,7 @@ linux_msleep_interruptible(unsigned int ms)
|
||||
/* guard against invalid values */
|
||||
if (ms == 0)
|
||||
ms = 1;
|
||||
ret = -pause_sbt("lnxsleep", SBT_1MS * ms, 0, C_HARDCLOCK | C_CATCH);
|
||||
ret = -pause_sbt("lnxsleep", mstosbt(ms), 0, C_HARDCLOCK | C_CATCH);
|
||||
|
||||
switch (ret) {
|
||||
case -EWOULDBLOCK:
|
||||
|
Loading…
Reference in New Issue
Block a user