Module: xenomai-head
Branch: master
Commit: 0845421095387b6a676b647175f2c4bcb69cc628
URL:    
http://git.xenomai.org/?p=xenomai-head.git;a=commit;h=0845421095387b6a676b647175f2c4bcb69cc628

Author: Gilles Chanteperdrix <gilles.chanteperd...@xenomai.org>
Date:   Thu Jan 20 20:55:53 2011 +0100

nucleus: try harder not to restart syscall with the __xn_exec_norestart flag

Upon interruption of such syscall, ENORESTARTHAND is returned which could
cause the syscall to be restarted if the signal has no handler, which seems
to be the case, notably for gdb service signals. Try harder to avoid the
syscall being restarted by returning EINTR instead.

---

 ksrc/nucleus/shadow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index d27494c..717a8a0 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -770,7 +770,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);
                }
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@gna.org
https://mail.gna.org/listinfo/xenomai-git

Reply via email to