diff options
author | jhb <jhb@FreeBSD.org> | 2005-07-07 19:16:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-07-07 19:16:30 +0000 |
commit | 43340a2b9eb2ef712c449a62e7cd066b59fec068 (patch) | |
tree | 7ae9acccf748cbe07b5fa7e758b8eef079e4e307 /sys/alpha/osf1 | |
parent | f962c71215e0f2771bdbbf463ff9b6007bfd3400 (diff) | |
download | FreeBSD-src-43340a2b9eb2ef712c449a62e7cd066b59fec068.zip FreeBSD-src-43340a2b9eb2ef712c449a62e7cd066b59fec068.tar.gz |
- 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)
Diffstat (limited to 'sys/alpha/osf1')
-rw-r--r-- | sys/alpha/osf1/osf1_misc.c | 12 |
1 files changed, 4 insertions, 8 deletions
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); } |