aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/signal.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2005-07-11 16:45:51 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:41 -0400
commit129bc8f78b468df6824dd1584829f10aa3a69c27 (patch)
tree714e9026691a406ffb76110486f21ca3107df938 /arch/mips/kernel/signal.c
parentb490ff42709546d5cf6b631c1a84a5f4fcb020e4 (diff)
Setup_frame is now returning a success value.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/signal.c')
-rw-r--r--arch/mips/kernel/signal.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 8679ccff870e..9202a17db8f7 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -278,7 +278,7 @@ badframe:
278} 278}
279 279
280#ifdef CONFIG_TRAD_SIGNALS 280#ifdef CONFIG_TRAD_SIGNALS
281void setup_frame(struct k_sigaction * ka, struct pt_regs *regs, 281int setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
282 int signr, sigset_t *set) 282 int signr, sigset_t *set)
283{ 283{
284 struct sigframe *frame; 284 struct sigframe *frame;
@@ -317,14 +317,15 @@ void setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
317 current->comm, current->pid, 317 current->comm, current->pid,
318 frame, regs->cp0_epc, frame->regs[31]); 318 frame, regs->cp0_epc, frame->regs[31]);
319#endif 319#endif
320 return; 320 return 1;
321 321
322give_sigsegv: 322give_sigsegv:
323 force_sigsegv(signr, current); 323 force_sigsegv(signr, current);
324 return 0;
324} 325}
325#endif 326#endif
326 327
327void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs, 328int setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
328 int signr, sigset_t *set, siginfo_t *info) 329 int signr, sigset_t *set, siginfo_t *info)
329{ 330{
330 struct rt_sigframe *frame; 331 struct rt_sigframe *frame;
@@ -376,18 +377,21 @@ void setup_rt_frame(struct k_sigaction * ka, struct pt_regs *regs,
376 current->comm, current->pid, 377 current->comm, current->pid,
377 frame, regs->cp0_epc, regs->regs[31]); 378 frame, regs->cp0_epc, regs->regs[31]);
378#endif 379#endif
379 return; 380 return 1;
380 381
381give_sigsegv: 382give_sigsegv:
382 force_sigsegv(signr, current); 383 force_sigsegv(signr, current);
384 return 0;
383} 385}
384 386
385extern void setup_rt_frame_n32(struct k_sigaction * ka, 387extern void setup_rt_frame_n32(struct k_sigaction * ka,
386 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info); 388 struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info);
387 389
388static inline void handle_signal(unsigned long sig, siginfo_t *info, 390static inline int handle_signal(unsigned long sig, siginfo_t *info,
389 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs) 391 struct k_sigaction *ka, sigset_t *oldset, struct pt_regs *regs)
390{ 392{
393 int ret;
394
391 switch(regs->regs[0]) { 395 switch(regs->regs[0]) {
392 case ERESTART_RESTARTBLOCK: 396 case ERESTART_RESTARTBLOCK:
393 case ERESTARTNOHAND: 397 case ERESTARTNOHAND:
@@ -407,9 +411,9 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
407 regs->regs[0] = 0; /* Don't deal with this again. */ 411 regs->regs[0] = 0; /* Don't deal with this again. */
408 412
409 if (sig_uses_siginfo(ka)) 413 if (sig_uses_siginfo(ka))
410 current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info); 414 ret = current->thread.abi->setup_rt_frame(ka, regs, sig, oldset, info);
411 else 415 else
412 current->thread.abi->setup_frame(ka, regs, sig, oldset); 416 ret = current->thread.abi->setup_frame(ka, regs, sig, oldset);
413 417
414 spin_lock_irq(&current->sighand->siglock); 418 spin_lock_irq(&current->sighand->siglock);
415 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask); 419 sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
@@ -417,6 +421,8 @@ static inline void handle_signal(unsigned long sig, siginfo_t *info,
417 sigaddset(&current->blocked,sig); 421 sigaddset(&current->blocked,sig);
418 recalc_sigpending(); 422 recalc_sigpending();
419 spin_unlock_irq(&current->sighand->siglock); 423 spin_unlock_irq(&current->sighand->siglock);
424
425 return ret;
420} 426}
421 427
422int do_signal(sigset_t *oldset, struct pt_regs *regs) 428int do_signal(sigset_t *oldset, struct pt_regs *regs)
@@ -440,10 +446,8 @@ int do_signal(sigset_t *oldset, struct pt_regs *regs)
440 oldset = &current->blocked; 446 oldset = &current->blocked;
441 447
442 signr = get_signal_to_deliver(&info, &ka, regs, NULL); 448 signr = get_signal_to_deliver(&info, &ka, regs, NULL);
443 if (signr > 0) { 449 if (signr > 0)
444 handle_signal(signr, &info, &ka, oldset, regs); 450 return handle_signal(signr, &info, &ka, oldset, regs);
445 return 1;
446 }
447 451
448no_signal: 452no_signal:
449 /* 453 /*