aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2013-07-19 05:31:36 -0400
committerRichard Weinberger <richard@nod.at>2013-07-19 05:31:36 -0400
commit9a8c1359571c5d5e2fbc43cf457a6486b70a70cb (patch)
tree4a1ea590b186fca57a1dfa3f76177f7622b6d721 /arch/um/os-Linux
parent7473534130c3156d199512c99ff1b796233e8547 (diff)
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>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r--arch/um/os-Linux/signal.c8
-rw-r--r--arch/um/os-Linux/skas/process.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index 9d9f1b4bf826..905924b773d3 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -25,7 +25,7 @@ void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
25 [SIGIO] = sigio_handler, 25 [SIGIO] = sigio_handler,
26 [SIGVTALRM] = timer_handler }; 26 [SIGVTALRM] = timer_handler };
27 27
28static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc) 28static void sig_handler_common(int sig, struct siginfo *si, mcontext_t *mc)
29{ 29{
30 struct uml_pt_regs r; 30 struct uml_pt_regs r;
31 int save_errno = errno; 31 int save_errno = errno;
@@ -61,7 +61,7 @@ static void sig_handler_common(int sig, siginfo_t *si, mcontext_t *mc)
61static int signals_enabled; 61static int signals_enabled;
62static unsigned int signals_pending; 62static unsigned int signals_pending;
63 63
64void sig_handler(int sig, siginfo_t *si, mcontext_t *mc) 64void sig_handler(int sig, struct siginfo *si, mcontext_t *mc)
65{ 65{
66 int enabled; 66 int enabled;
67 67
@@ -120,7 +120,7 @@ void set_sigstack(void *sig_stack, int size)
120 panic("enabling signal stack failed, errno = %d\n", errno); 120 panic("enabling signal stack failed, errno = %d\n", errno);
121} 121}
122 122
123static void (*handlers[_NSIG])(int sig, siginfo_t *si, mcontext_t *mc) = { 123static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
124 [SIGSEGV] = sig_handler, 124 [SIGSEGV] = sig_handler,
125 [SIGBUS] = sig_handler, 125 [SIGBUS] = sig_handler,
126 [SIGILL] = sig_handler, 126 [SIGILL] = sig_handler,
@@ -162,7 +162,7 @@ static void hard_handler(int sig, siginfo_t *si, void *p)
162 while ((sig = ffs(pending)) != 0){ 162 while ((sig = ffs(pending)) != 0){
163 sig--; 163 sig--;
164 pending &= ~(1 << sig); 164 pending &= ~(1 << sig);
165 (*handlers[sig])(sig, si, mc); 165 (*handlers[sig])(sig, (struct siginfo *)si, mc);
166 } 166 }
167 167
168 /* 168 /*
diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
index 441e4ba074f4..d531879a4617 100644
--- a/arch/um/os-Linux/skas/process.c
+++ b/arch/um/os-Linux/skas/process.c
@@ -414,7 +414,7 @@ void userspace(struct uml_pt_regs *regs)
414 if (WIFSTOPPED(status)) { 414 if (WIFSTOPPED(status)) {
415 int sig = WSTOPSIG(status); 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 switch (sig) { 419 switch (sig) {
420 case SIGSEGV: 420 case SIGSEGV:
@@ -422,7 +422,7 @@ void userspace(struct uml_pt_regs *regs)
422 !ptrace_faultinfo) { 422 !ptrace_faultinfo) {
423 get_skas_faultinfo(pid, 423 get_skas_faultinfo(pid,
424 &regs->faultinfo); 424 &regs->faultinfo);
425 (*sig_info[SIGSEGV])(SIGSEGV, &si, 425 (*sig_info[SIGSEGV])(SIGSEGV, (struct siginfo *)&si,
426 regs); 426 regs);
427 } 427 }
428 else handle_segv(pid, regs); 428 else handle_segv(pid, regs);
@@ -431,14 +431,14 @@ void userspace(struct uml_pt_regs *regs)
431 handle_trap(pid, regs, local_using_sysemu); 431 handle_trap(pid, regs, local_using_sysemu);
432 break; 432 break;
433 case SIGTRAP: 433 case SIGTRAP:
434 relay_signal(SIGTRAP, &si, regs); 434 relay_signal(SIGTRAP, (struct siginfo *)&si, regs);
435 break; 435 break;
436 case SIGVTALRM: 436 case SIGVTALRM:
437 now = os_nsecs(); 437 now = os_nsecs();
438 if (now < nsecs) 438 if (now < nsecs)
439 break; 439 break;
440 block_signals(); 440 block_signals();
441 (*sig_info[sig])(sig, &si, regs); 441 (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
442 unblock_signals(); 442 unblock_signals();
443 nsecs = timer.it_value.tv_sec * 443 nsecs = timer.it_value.tv_sec *
444 UM_NSEC_PER_SEC + 444 UM_NSEC_PER_SEC +
@@ -452,7 +452,7 @@ void userspace(struct uml_pt_regs *regs)
452 case SIGFPE: 452 case SIGFPE:
453 case SIGWINCH: 453 case SIGWINCH:
454 block_signals(); 454 block_signals();
455 (*sig_info[sig])(sig, &si, regs); 455 (*sig_info[sig])(sig, (struct siginfo *)&si, regs);
456 unblock_signals(); 456 unblock_signals();
457 break; 457 break;
458 default: 458 default: