From 43340a2b9eb2ef712c449a62e7cd066b59fec068 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 7 Jul 2005 19:16:30 +0000 Subject: - Remove spl's from osf1_usleep_thread(). - Fix the calculation of the 'slept' timeval returned by osf1_usleep_thread() which has been broken since 1.1. Approved by: re (scottl) --- sys/alpha/osf1/osf1_misc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'sys/alpha') diff --git a/sys/alpha/osf1/osf1_misc.c b/sys/alpha/osf1/osf1_misc.c index dd5ec7a..63ce5ee 100644 --- a/sys/alpha/osf1/osf1_misc.c +++ b/sys/alpha/osf1/osf1_misc.c @@ -1256,7 +1256,7 @@ osf1_usleep_thread(td, uap) struct thread *td; struct osf1_usleep_thread_args *uap; { - int error, s, timo; + int error, timo; struct osf1_timeval time; struct timeval difftv, endtv, sleeptv, tv; @@ -1274,19 +1274,15 @@ osf1_usleep_thread(td, uap) if (timo == 0) timo = 1; - s = splclock(); microtime(&tv); - splx(s); tsleep(td, PUSER|PCATCH, "OSF/1", timo); if (uap->slept != NULL) { - s = splclock(); microtime(&endtv); - timersub(&time, &endtv, &difftv); - splx(s); - if (tv.tv_sec < 0 || tv.tv_usec < 0) - tv.tv_sec = tv.tv_usec = 0; + timersub(&endtv, &tv, &difftv); + if (difftv.tv_sec < 0 || difftv.tv_usec < 0) + difftv.tv_sec = difftv.tv_usec = 0; TV_CP(difftv, time) error = copyout(&time, uap->slept, sizeof time); } -- cgit v1.1