summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libpthread/uthread/uthread_kern.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libpthread/uthread/uthread_kern.c b/lib/libpthread/uthread/uthread_kern.c
index dab360b40fe..80b873ee633 100644
--- a/lib/libpthread/uthread/uthread_kern.c
+++ b/lib/libpthread/uthread/uthread_kern.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthread_kern.c,v 1.38 2011/07/07 09:25:16 guenther Exp $ */
+/* $OpenBSD: uthread_kern.c,v 1.39 2011/09/05 21:24:24 guenther Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>
* All rights reserved.
@@ -467,6 +467,9 @@ _thread_kern_sched(struct sigcontext * scp)
curthread->slice_usec = 0;
}
+ /* Restore errno. */
+ errno = curthread->error;
+
/*
* If we're 'switching' to the current thread,
* then don't bother with the save/restore
@@ -474,9 +477,6 @@ _thread_kern_sched(struct sigcontext * scp)
if (curthread == old_thread_run)
goto after_switch;
- /* Restore errno. */
- errno = curthread->error;
-
/* Restore floating point state. */
_thread_machdep_restore_float_state(&curthread->_machdep);