Commit 9a8c1359571c5d5e2fbc43cf457a6486b70a70cb

Authored by Richard Weinberger
1 parent 7473534130

um: siginfo cleanup

Currently we use both struct siginfo and siginfo_t.
Let's use struct siginfo internally to avoid ongoing
compiler warning. We are allowed to do so because
struct siginfo and siginfo_t are equivalent.

Signed-off-by: Richard Weinberger <richard@nod.at>

Showing 4 changed files with 15 additions and 15 deletions Side-by-side Diff

arch/um/include/shared/frame_kern.h
... ... @@ -6,13 +6,13 @@
6 6 #ifndef __FRAME_KERN_H_
7 7 #define __FRAME_KERN_H_
8 8  
9   -extern int setup_signal_stack_sc(unsigned long stack_top, int sig,
  9 +extern int setup_signal_stack_sc(unsigned long stack_top, int sig,
10 10 struct k_sigaction *ka,
11   - struct pt_regs *regs,
  11 + struct pt_regs *regs,
12 12 sigset_t *mask);
13   -extern int setup_signal_stack_si(unsigned long stack_top, int sig,
  13 +extern int setup_signal_stack_si(unsigned long stack_top, int sig,
14 14 struct k_sigaction *ka,
15   - struct pt_regs *regs, siginfo_t *info,
  15 + struct pt_regs *regs, struct siginfo *info,
16 16 sigset_t *mask);
17 17  
18 18 #endif
arch/um/kernel/signal.c
... ... @@ -19,7 +19,7 @@
19 19 * OK, we're invoking a handler
20 20 */
21 21 static void handle_signal(struct pt_regs *regs, unsigned long signr,
22   - struct k_sigaction *ka, siginfo_t *info)
  22 + struct k_sigaction *ka, struct siginfo *info)
23 23 {
24 24 sigset_t *oldset = sigmask_to_save();
25 25 int singlestep = 0;
... ... @@ -71,7 +71,7 @@
71 71 static int kern_do_signal(struct pt_regs *regs)
72 72 {
73 73 struct k_sigaction ka_copy;
74   - siginfo_t info;
  74 + struct siginfo info;
75 75 int sig, handled_sig = 0;
76 76  
77 77 while ((sig = get_signal_to_deliver(&info, &ka_copy, regs, NULL)) > 0) {
arch/um/os-Linux/signal.c
... ... @@ -25,7 +25,7 @@
25 25 [SIGIO] = sigio_handler,
26 26 [SIGVTALRM] = timer_handler };
27 27  
28   -static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc)
  28 +static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
29 29 {
30 30 struct uml_pt_regs r;
31 31 int save_errno = errno;
... ... @@ -61,7 +61,7 @@
61 61 static int signals_enabled;
62 62 static unsigned int signals_pending;
63 63  
64   -void sig_handler(int sig, siginfo_t *si, mcontext_t *mc)
  64 +void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
65 65 {
66 66 int enabled;
67 67  
... ... @@ -120,7 +120,7 @@
120 120 panic("enabling signal stack failed, errno = %d\n", errno);
121 121 }
122 122  
123   -static void (*handlers[_NSIG])(int sig, siginfo_t *si, mcontext_t *mc) = {
  123 +static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
124 124 [SIGSEGV] = sig_handler,
125 125 [SIGBUS] = sig_handler,
126 126 [SIGILL] = sig_handler,
... ... @@ -162,7 +162,7 @@
162 162 while ((sig = ffs(pending)) != 0){
163 163 sig--;
164 164 pending &= ~(1 << sig);
165   - (*handlers[sig])(sig, si, mc);
  165 + (*handlers[sig])(sig, (struct siginfo *)si, mc);
166 166 }
167 167  
168 168 /*
arch/um/os-Linux/skas/process.c
... ... @@ -414,7 +414,7 @@
414 414 if (WIFSTOPPED(status)) {
415 415 int sig = WSTOPSIG(status);
416 416  
417   - ptrace(PTRACE_GETSIGINFO, pid, 0, &si);
  417 + ptrace(PTRACE_GETSIGINFO, pid, 0, (struct siginfo *)&si);
418 418  
419 419 switch (sig) {
420 420 case SIGSEGV:
... ... @@ -422,7 +422,7 @@
422 422 !ptrace_faultinfo) {
423 423 get_skas_faultinfo(pid,
424 424 &regs->faultinfo);
425   - (*sig_info[SIGSEGV])(SIGSEGV, &si,
  425 + (*sig_info[SIGSEGV])(SIGSEGV, (struct siginfo *)&si,
426 426 regs);
427 427 }
428 428 else handle_segv(pid, regs);
429 429  
... ... @@ -431,14 +431,14 @@
431 431 handle_trap(pid, regs, local_using_sysemu);
432 432 break;
433 433 case SIGTRAP:
434   - relay_signal(SIGTRAP, &si, regs);
  434 + relay_signal(SIGTRAP, (struct siginfo *)&si, regs);
435 435 break;
436 436 case SIGVTALRM:
437 437 now = os_nsecs();
438 438 if (now < nsecs)
439 439 break;
440 440 block_signals();
441   - (*sig_info[sig])(sig, &si, regs);
  441 + (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
442 442 unblock_signals();
443 443 nsecs = timer.it_value.tv_sec *
444 444 UM_NSEC_PER_SEC +
... ... @@ -452,7 +452,7 @@
452 452 case SIGFPE:
453 453 case SIGWINCH:
454 454 block_signals();
455   - (*sig_info[sig])(sig, &si, regs);
  455 + (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
456 456 unblock_signals();
457 457 break;
458 458 default: