diff options
| author | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-23 21:46:50 +0000 |
|---|---|---|
| committer | Daniel Eischen <deischen@FreeBSD.org> | 2003-04-23 21:46:50 +0000 |
| commit | f1c8192fd426ea8d3256f3a25b7aa9d3dac7f3a4 (patch) | |
| tree | af28d42652346683148a8b0c30e59e30d9b9b8dd /lib/libpthread/sys/thr_error.c | |
| parent | 6fd839f9c737f75c37d85477cffac22def69f98f (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/sys/thr_error.c')
| -rw-r--r-- | lib/libpthread/sys/thr_error.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libpthread/sys/thr_error.c b/lib/libpthread/sys/thr_error.c index a4a85078f227..6f19f931fce9 100644 --- a/lib/libpthread/sys/thr_error.c +++ b/lib/libpthread/sys/thr_error.c @@ -36,14 +36,18 @@ #include <pthread.h> #include "libc_private.h" #include "thr_private.h" + extern int errno; -int * __error() +int * +__error(void) { struct pthread *curthread; if (__isthreaded == 0) return (&errno); + else if (_kse_in_critical()) + return &(_get_curkse()->k_error); else { curthread = _get_curthread(); if ((curthread == NULL) || (curthread == _thr_initial)) |
