change struct ucontext to ucontext_t nanjing-devel release-20190215 accepted/tizen/devbase/tools/20190927.044943 submit/trunk/20190927.012842 submit/trunk/20191017.111201 submit/trunk/20191017.233826 submit/trunk/20191030.112603 submit/trunk/20191101.102136
authorbiao716.wang <biao716.wang@samsung.com>
Tue, 7 Aug 2018 07:19:14 +0000 (15:19 +0800)
committerRen Jingui <jingui.ren@samsung.com>
Fri, 1 Feb 2019 05:55:10 +0000 (05:55 +0000)
In old version
typedef struct ucontext
   {
     XXX
   } ucontext_t;

now,
typedef struct ucontext_t
   {
   XXX
   } ucontext_t;

Change-Id: I544e2f293ee6f2fd4880cde47a807fcc15ddb006

user-exec.c

index 82bfa66ce303efdfc94701e657674a95b7ce7ea4..026c543221696b59c271148a2a6e5066a4812371 100644 (file)
@@ -53,7 +53,9 @@ static void exception_action(CPUArchState *env1)
 void cpu_resume_from_signal(CPUArchState *env1, void *puc)
 {
 #ifdef __linux__
-    struct ucontext *uc = puc;
+   // struct ucontext *uc = puc;
+   // in ubuntu 18.04, typedef struct ucontext_t ucontext_t, not typedef struct ucontext ucontext anymore.
+      ucontext_t *uc = puc;
 #elif defined(__OpenBSD__)
     struct sigcontext *uc = puc;
 #endif
@@ -164,7 +166,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 #elif defined(__OpenBSD__)
     struct sigcontext *uc = puc;
 #else
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
 #endif
     unsigned long pc;
     int trapno;
@@ -219,7 +221,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 #elif defined(__OpenBSD__)
     struct sigcontext *uc = puc;
 #else
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
 #endif
 
     pc = PC_sig(uc);
@@ -324,7 +326,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
     ucontext_t *uc = puc;
 #else
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
 #endif
     unsigned long pc;
     int is_write;
@@ -351,7 +353,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                            void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     uint32_t *pc = uc->uc_mcontext.sc_pc;
     uint32_t insn = *pc;
     int is_write = 0;
@@ -438,7 +440,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     unsigned long pc;
     int is_write;
 
@@ -463,7 +465,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     uint64_t pc;
     int is_write = 0; /* XXX how to determine? */
 
@@ -478,7 +480,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     unsigned long pc;
     int is_write;
 
@@ -500,7 +502,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
 int cpu_signal_handler(int host_signum, void *pinfo, void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     unsigned long ip;
     int is_write = 0;
 
@@ -531,7 +533,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     unsigned long pc;
     uint16_t *pinsn;
     int is_write = 0;
@@ -584,7 +586,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     greg_t pc = uc->uc_mcontext.pc;
     int is_write;
 
@@ -600,7 +602,7 @@ int cpu_signal_handler(int host_signum, void *pinfo,
                        void *puc)
 {
     siginfo_t *info = pinfo;
-    struct ucontext *uc = puc;
+    ucontext_t *uc = puc;
     unsigned long pc = uc->uc_mcontext.sc_iaoq[0];
     uint32_t insn = *(uint32_t *)pc;
     int is_write = 0;