summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_exit.c')
-rw-r--r--lib/libpthread/thread/thr_exit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_exit.c b/lib/libpthread/thread/thr_exit.c
index 6dbef07..5894206 100644
--- a/lib/libpthread/thread/thr_exit.c
+++ b/lib/libpthread/thread/thr_exit.c
@@ -87,6 +87,8 @@ _pthread_exit(void *status)
{
struct pthread *curthread = _get_curthread();
+ if (!_kse_isthreaded())
+ exit(0);
/* Check if this thread is already in the process of exiting: */
if ((curthread->flags & THR_FLAGS_EXITING) != 0) {
char msg[128];
OpenPOWER on IntegriCloud