diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2005-07-07 19:16:30 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2005-07-07 19:16:30 +0000 |
| commit | a146c8c620aa165e3f65c43070e9335f2bf0729c (patch) | |
| tree | 7ae9acccf748cbe07b5fa7e758b8eef079e4e307 | |
| parent | 9f3157a2540f553542bb34297f371682ea6fe97e (diff) | |
Notes
| -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 dd5ec7a5ad84..63ce5eed5cc4 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); } |
