summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_resume_np.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread/uthread_resume_np.c')
-rw-r--r--lib/libc_r/uthread/uthread_resume_np.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_resume_np.c b/lib/libc_r/uthread/uthread_resume_np.c
index a254814..934df58 100644
--- a/lib/libc_r/uthread/uthread_resume_np.c
+++ b/lib/libc_r/uthread/uthread_resume_np.c
@@ -49,21 +49,21 @@ pthread_resume_np(pthread_t thread)
/* Found the thread. Is it suspended? */
if (pthread->state == PS_SUSPENDED) {
/* Allow the thread to run. */
- pthread->state = PS_RUNNING;
+ PTHREAD_NEW_STATE(pthread,PS_RUNNING);
ret = 0;
} else if (pthread->state == PS_RUNNING) {
/* Thread is already running. */
ret = 0;
} else {
/* Thread is in some other state. */
- _thread_seterrno(_thread_run,EINVAL);
+ errno = EINVAL;
}
}
}
/* Check if thread was not found. */
if (ret == -1) {
/* No such thread */
- _thread_seterrno(_thread_run,ESRCH);
+ errno = ESRCH;
}
return(ret);
}
OpenPOWER on IntegriCloud