Module: xenomai-gch Branch: for-2.4 Commit: daa90535d99e549e87bd1985ae0b17d8f07b2fcc URL: http://git.xenomai.org/?p=xenomai-gch.git;a=commit;h=daa90535d99e549e87bd1985ae0b17d8f07b2fcc
Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org> Date: Fri Dec 4 23:50:37 2009 +0100 posix: fix pthread_cond_wait syscall signals handling --- ksrc/nucleus/shadow.c | 2 +- ksrc/skins/posix/syscall.c | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c index 0b02f70..b361480 100644 --- a/ksrc/nucleus/shadow.c +++ b/ksrc/nucleus/shadow.c @@ -823,7 +823,7 @@ static inline void request_syscall_restart(xnthread_t *thread, if (__xn_interrupted_p(regs)) { __xn_error_return(regs, (sysflags & __xn_exec_norestart) ? - -ERESTARTNOHAND : -ERESTARTSYS); + -EINTR : -ERESTARTSYS); notify = !xnthread_test_state(thread, XNDEBUG); } diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c index d936f21..4051257 100644 --- a/ksrc/skins/posix/syscall.c +++ b/ksrc/skins/posix/syscall.c @@ -1518,18 +1518,6 @@ static int __pthread_cond_wait_prologue(struct task_struct *curr, timed, XN_INFINITE); - if (err == EINTR) { - do { - xnthread_clear_info(cur, XNKICKED); - err = pse51_cond_timedwait_epilogue(cur, &cnd.shadow_cond, - &mx.shadow_mutex, count); - } - while (err == EINTR); - xnthread_set_info(cur, XNKICKED); - err = EINTR; - } - - if (!err || err == EINTR || err == ETIMEDOUT) __xn_copy_to_user(curr, (void __user *) __xn_reg_arg3(regs), &count, sizeof(count)); @@ -2834,7 +2822,7 @@ static xnsysent_t __systab[] = { [__pse51_cond_init] = {&__pthread_cond_init, __xn_exec_any}, [__pse51_cond_destroy] = {&__pthread_cond_destroy, __xn_exec_any}, [__pse51_cond_wait_prologue] = - {&__pthread_cond_wait_prologue, __xn_exec_primary}, + {&__pthread_cond_wait_prologue, __xn_exec_primary | __xn_exec_norestart}, [__pse51_cond_wait_epilogue] = {&__pthread_cond_wait_epilogue, __xn_exec_primary}, [__pse51_cond_signal] = {&__pthread_cond_signal, __xn_exec_any}, _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git