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:
Hans Petter Selasky 2018-03-03 19:26:40 +00:00
parent 7cf1c51588
commit ccae7bb851
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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: