Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 130347
b: refs/heads/master
c: f3221a3
h: refs/heads/master
i:
  130345: 41b338e
  130343: aba6783
v: v3
  • Loading branch information
Greg Ungerer committed Jan 27, 2009
1 parent bb06657 commit e77cd95
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d88ffccbca0428e9b12feec45a2bc7f09efa1ab2
refs/heads/master: f3221a39de12377e6eb76460abf95b08f7fb9178
15 changes: 15 additions & 0 deletions trunk/arch/m68knommu/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ restore_sigcontext(struct pt_regs *regs, struct sigcontext *usc, void *fp,
struct sigcontext context;
int err = 0;

/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;

/* get previous context */
if (copy_from_user(&context, usc, sizeof(context)))
goto badframe;
Expand Down Expand Up @@ -316,6 +319,9 @@ rt_restore_ucontext(struct pt_regs *regs, struct switch_stack *sw,
unsigned long usp;
int err;

/* Always make any pending restarted system calls return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall;

err = __get_user(temp, &uc->uc_mcontext.version);
if (temp != MCONTEXT_VERSION)
goto badframe;
Expand Down Expand Up @@ -692,6 +698,15 @@ handle_restart(struct pt_regs *regs, struct k_sigaction *ka, int has_handler)
regs->d0 = -EINTR;
break;

case -ERESTART_RESTARTBLOCK:
if (!has_handler) {
regs->d0 = __NR_restart_syscall;
regs->pc -= 2;
break;
}
regs->d0 = -EINTR;
break;

case -ERESTARTSYS:
if (has_handler && !(ka->sa.sa_flags & SA_RESTART)) {
regs->d0 = -EINTR;
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/m68knommu/kernel/syscalltable.S
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
.text
ALIGN
ENTRY(sys_call_table)
.long sys_ni_syscall /* 0 - old "setup()" system call*/
.long sys_restart_syscall /* 0 - old "setup()" system call */
.long sys_exit
.long sys_fork
.long sys_read
Expand Down

0 comments on commit e77cd95

Please sign in to comment.