qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64
@ 2011-07-12 20:27 Peter Maydell
  2011-07-18 10:18 ` Alexander Graf
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2011-07-12 20:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, Alexander Graf, patches

The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and
'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*,
bringing them into line with the other targets and fixing a compile
failure on ia64 hosts caused by this clash.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 linux-user/signal.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/linux-user/signal.c b/linux-user/signal.c
index 7d168e1..07ad07a 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -3662,11 +3662,11 @@ typedef struct {
 } sigframe;
 
 struct target_ucontext {
-    target_ulong uc_flags;
-    struct target_ucontext *uc_link;
-    target_stack_t uc_stack;
-    target_sigregs uc_mcontext;
-    target_sigset_t uc_sigmask;   /* mask last for extensibility */
+    target_ulong tuc_flags;
+    struct target_ucontext *tuc_link;
+    target_stack_t tuc_stack;
+    target_sigregs tuc_mcontext;
+    target_sigset_t tuc_sigmask;   /* mask last for extensibility */
 };
 
 typedef struct {
@@ -3814,16 +3814,16 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka,
     }
 
     /* Create the ucontext.  */
-    __put_user(0, &frame->uc.uc_flags);
-    __put_user((abi_ulong)0, (abi_ulong *)&frame->uc.uc_link);
-    __put_user(target_sigaltstack_used.ss_sp, &frame->uc.uc_stack.ss_sp);
+    __put_user(0, &frame->uc.tuc_flags);
+    __put_user((abi_ulong)0, (abi_ulong *)&frame->uc.tuc_link);
+    __put_user(target_sigaltstack_used.ss_sp, &frame->uc.tuc_stack.ss_sp);
     __put_user(sas_ss_flags(get_sp_from_cpustate(env)),
-                      &frame->uc.uc_stack.ss_flags);
-    __put_user(target_sigaltstack_used.ss_size, &frame->uc.uc_stack.ss_size);
-    save_sigregs(env, &frame->uc.uc_mcontext);
+                      &frame->uc.tuc_stack.ss_flags);
+    __put_user(target_sigaltstack_used.ss_size, &frame->uc.tuc_stack.ss_size);
+    save_sigregs(env, &frame->uc.tuc_mcontext);
     for (i = 0; i < TARGET_NSIG_WORDS; i++) {
         __put_user((abi_ulong)set->sig[i],
-        (abi_ulong *)&frame->uc.uc_sigmask.sig[i]);
+        (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]);
     }
 
     /* Set up to return from userspace.  If provided, use a stub
@@ -3928,15 +3928,15 @@ long do_rt_sigreturn(CPUState *env)
     if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) {
         goto badframe;
     }
-    target_to_host_sigset(&set, &frame->uc.uc_sigmask);
+    target_to_host_sigset(&set, &frame->uc.tuc_sigmask);
 
     sigprocmask(SIG_SETMASK, &set, NULL); /* ~_BLOCKABLE? */
 
-    if (restore_sigregs(env, &frame->uc.uc_mcontext)) {
+    if (restore_sigregs(env, &frame->uc.tuc_mcontext)) {
         goto badframe;
     }
 
-    if (do_sigaltstack(frame_addr + offsetof(rt_sigframe, uc.uc_stack), 0,
+    if (do_sigaltstack(frame_addr + offsetof(rt_sigframe, uc.tuc_stack), 0,
                        get_sp_from_cpustate(env)) == -EFAULT) {
         goto badframe;
     }
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64
  2011-07-12 20:27 [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64 Peter Maydell
@ 2011-07-18 10:18 ` Alexander Graf
  2011-07-18 10:28   ` riku voipio
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Graf @ 2011-07-18 10:18 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Riku Voipio, qemu-devel, patches


On 12.07.2011, at 22:27, Peter Maydell wrote:

> The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and
> 'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*,
> bringing them into line with the other targets and fixing a compile
> failure on ia64 hosts caused by this clash.

Looks good to me. Riku, are you taking this into your linux-user tree?


Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64
  2011-07-18 10:18 ` Alexander Graf
@ 2011-07-18 10:28   ` riku voipio
  2011-07-18 10:38     ` Alexander Graf
  0 siblings, 1 reply; 4+ messages in thread
From: riku voipio @ 2011-07-18 10:28 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Peter Maydell, qemu-devel

On 07/18/2011 01:18 PM, Alexander Graf wrote:
>> The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and
>> 'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*,
>> bringing them into line with the other targets and fixing a compile
>> failure on ia64 hosts caused by this clash.

> Looks good to me. Riku, are you taking this into your linux-user tree?

Already included in the pull request I sent earlier today.

Riku

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64
  2011-07-18 10:28   ` riku voipio
@ 2011-07-18 10:38     ` Alexander Graf
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2011-07-18 10:38 UTC (permalink / raw)
  To: riku voipio; +Cc: Peter Maydell, qemu-devel


On 18.07.2011, at 12:28, riku voipio wrote:

> On 07/18/2011 01:18 PM, Alexander Graf wrote:
>>> The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and
>>> 'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*,
>>> bringing them into line with the other targets and fixing a compile
>>> failure on ia64 hosts caused by this clash.
> 
>> Looks good to me. Riku, are you taking this into your linux-user tree?
> 
> Already included in the pull request I sent earlier today.

Ah, must have missed it. Thanks!

Alex

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-18 10:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 20:27 [Qemu-devel] [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64 Peter Maydell
2011-07-18 10:18 ` Alexander Graf
2011-07-18 10:28   ` riku voipio
2011-07-18 10:38     ` Alexander Graf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).