aboutsummaryrefslogtreecommitdiff
path: root/linux-user
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2009-10-01 16:12:16 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-01 16:12:16 -0500
commitc227f0995e1722a1abccc28cadf0664266bd8043 (patch)
tree39e92c2f818e3e8144978740b914731613af0e40 /linux-user
parent99a0949b720a0936da2052cb9a46db04ffc6db29 (diff)
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/alpha/target_signal.h2
-rw-r--r--linux-user/alpha/termbits.h22
-rw-r--r--linux-user/arm/target_signal.h2
-rw-r--r--linux-user/cris/target_signal.h2
-rw-r--r--linux-user/elfload.c64
-rw-r--r--linux-user/i386/target_signal.h2
-rw-r--r--linux-user/m68k/target_signal.h2
-rw-r--r--linux-user/main.c24
-rw-r--r--linux-user/microblaze/target_signal.h2
-rw-r--r--linux-user/mips/target_signal.h2
-rw-r--r--linux-user/mips64/target_signal.h2
-rw-r--r--linux-user/mipsn32/target_signal.h2
-rw-r--r--linux-user/ppc/target_signal.h2
-rw-r--r--linux-user/qemu.h8
-rw-r--r--linux-user/sh4/target_signal.h2
-rw-r--r--linux-user/signal.c246
-rw-r--r--linux-user/sparc/target_signal.h2
-rw-r--r--linux-user/sparc64/target_signal.h2
-rw-r--r--linux-user/syscall.c36
-rw-r--r--linux-user/syscall_defs.h56
-rw-r--r--linux-user/x86_64/target_signal.h2
-rw-r--r--linux-user/x86_64/termbits.h18
22 files changed, 251 insertions, 251 deletions
diff --git a/linux-user/alpha/target_signal.h b/linux-user/alpha/target_signal.h
index d73c44eb5e..2382ffdb6e 100644
--- a/linux-user/alpha/target_signal.h
+++ b/linux-user/alpha/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/alpha/termbits.h b/linux-user/alpha/termbits.h
index 56ab3eb432..6406b6a799 100644
--- a/linux-user/alpha/termbits.h
+++ b/linux-user/alpha/termbits.h
@@ -1,17 +1,17 @@
-typedef unsigned char a_target_cc;
-typedef unsigned int a_target_speed;
-typedef unsigned int a_target_tcflag;
+typedef unsigned char target_cc_t;
+typedef unsigned int target_speed_t;
+typedef unsigned int target_tcflag_t;
#define TARGET_NCCS 19
struct target_termios {
- a_target_tcflag c_iflag; /* input mode flags */
- a_target_tcflag c_oflag; /* output mode flags */
- a_target_tcflag c_cflag; /* control mode flags */
- a_target_tcflag c_lflag; /* local mode flags */
- a_target_cc c_cc[TARGET_NCCS]; /* control characters */
- a_target_cc c_line; /* line discipline (== c_cc[19]) */
- a_target_speed c_ispeed; /* input speed */
- a_target_speed c_ospeed; /* output speed */
+ target_tcflag_t c_iflag; /* input mode flags */
+ target_tcflag_t c_oflag; /* output mode flags */
+ target_tcflag_t c_cflag; /* control mode flags */
+ target_tcflag_t c_lflag; /* local mode flags */
+ target_cc_t c_cc[TARGET_NCCS]; /* control characters */
+ target_cc_t c_line; /* line discipline (== c_cc[19]) */
+ target_speed_t c_ispeed; /* input speed */
+ target_speed_t c_ospeed; /* output speed */
};
/* c_cc characters */
diff --git a/linux-user/arm/target_signal.h b/linux-user/arm/target_signal.h
index 71cc0c4321..2b3281312b 100644
--- a/linux-user/arm/target_signal.h
+++ b/linux-user/arm/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/cris/target_signal.h b/linux-user/cris/target_signal.h
index d0e7aec7dc..5611840f83 100644
--- a/linux-user/cris/target_signal.h
+++ b/linux-user/cris/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_ulong ss_size;
abi_long ss_flags;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 8f2049b2b2..07277a6a22 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -134,13 +134,13 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
regs->rip = infop->entry;
}
-typedef target_ulong a_target_elf_greg;
-typedef uint32_t a_target_uid;
-typedef uint32_t a_target_gid;
-typedef int32_t a_target_pid;
+typedef target_ulong target_elf_greg_t;
+typedef uint32_t target_uid_t;
+typedef uint32_t target_gid_t;
+typedef int32_t target_pid_t;
#define ELF_NREG 27
-typedef a_target_elf_greg a_target_elf_gregset[ELF_NREG];
+typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG];
/*
* Note that ELF_NREG should be 29 as there should be place for
@@ -149,7 +149,7 @@ typedef a_target_elf_greg a_target_elf_gregset[ELF_NREG];
*
* See linux kernel: arch/x86/include/asm/elf.h
*/
-static void elf_core_copy_regs(a_target_elf_gregset *regs, const CPUState *env)
+static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env)
{
(*regs)[0] = env->regs[15];
(*regs)[1] = env->regs[14];
@@ -211,13 +211,13 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
regs->edx = 0;
}
-typedef target_ulong a_target_elf_greg;
-typedef uint16_t a_target_uid;
-typedef uint16_t a_target_gid;
-typedef int32_t a_target_pid;
+typedef target_ulong target_elf_greg_t;
+typedef uint16_t target_uid_t;
+typedef uint16_t target_gid_t;
+typedef int32_t target_pid_t;
#define ELF_NREG 17
-typedef a_target_elf_greg a_target_elf_gregset[ELF_NREG];
+typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG];
/*
* Note that ELF_NREG should be 19 as there should be place for
@@ -226,7 +226,7 @@ typedef a_target_elf_greg a_target_elf_gregset[ELF_NREG];
*
* See linux kernel: arch/x86/include/asm/elf.h
*/
-static void elf_core_copy_regs(a_target_elf_gregset *regs, const CPUState *env)
+static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env)
{
(*regs)[0] = env->regs[R_EBX];
(*regs)[1] = env->regs[R_ECX];
@@ -286,15 +286,15 @@ static inline void init_thread(struct target_pt_regs *regs, struct image_info *i
regs->ARM_r10 = infop->start_data;
}
-typedef uint32_t a_target_elf_greg;
-typedef uint16_t a_target_uid;
-typedef uint16_t a_target_gid;
-typedef int32_t a_target_pid;
+typedef uint32_t target_elf_greg_t;
+typedef uint16_t target_uid_t;
+typedef uint16_t target_gid_t;
+typedef int32_t target_pid_t;
#define ELF_NREG 18
-typedef a_target_elf_greg a_target_elf_gregset[ELF_NREG];
+typedef target_elf_greg_t target_elf_gregset_t[ELF_NREG];
-static void elf_core_copy_regs(a_target_elf_gregset *regs, const CPUState *env)
+static void elf_core_copy_regs(target_elf_gregset_t *regs, const CPUState *env)
{
(*regs)[0] = env->regs[0];
(*regs)[1] = env->regs[1];
@@ -1768,21 +1768,21 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
* Next you define type of register set used for dumping. ELF specification
* says that it needs to be array of elf_greg_t that has size of ELF_NREG.
*
- * typedef <target_regtype> a_target_elf_greg;
+ * typedef <target_regtype> target_elf_greg_t;
* #define ELF_NREG <number of registers>
- * typedef a_taret_elf_greg a_target_elf_gregset[ELF_NREG];
+ * typedef taret_elf_greg_t target_elf_gregset_t[ELF_NREG];
*
* Then define following types to match target types. Actual types can
* be found from linux kernel (arch/<ARCH>/include/asm/posix_types.h):
*
- * typedef <target_uid_type> a_target_uid;
- * typedef <target_gid_type> a_target_gid;
- * typedef <target_pid_type> a_target_pid;
+ * typedef <target_uid_type> target_uid_t;
+ * typedef <target_gid_type> target_gid_t;
+ * typedef <target_pid_type> target_pid_t;
*
* Last step is to implement target specific function that copies registers
* from given cpu into just specified register set. Prototype is:
*
- * static void elf_core_copy_regs(a_taret_elf_gregset *regs,
+ * static void elf_core_copy_regs(taret_elf_gregset_t *regs,
* const CPUState *env);
*
* Parameters:
@@ -1814,15 +1814,15 @@ struct target_elf_prstatus {
short pr_cursig; /* Current signal */
target_ulong pr_sigpend; /* XXX */
target_ulong pr_sighold; /* XXX */
- a_target_pid pr_pid;
- a_target_pid pr_ppid;
- a_target_pid pr_pgrp;
- a_target_pid pr_sid;
+ target_pid_t pr_pid;
+ target_pid_t pr_ppid;
+ target_pid_t pr_pgrp;
+ target_pid_t pr_sid;
struct target_timeval pr_utime; /* XXX User time */
struct target_timeval pr_stime; /* XXX System time */
struct target_timeval pr_cutime; /* XXX Cumulative user time */
struct target_timeval pr_cstime; /* XXX Cumulative system time */
- a_target_elf_gregset pr_reg; /* GP registers */
+ target_elf_gregset_t pr_reg; /* GP registers */
int pr_fpvalid; /* XXX */
};
@@ -1834,9 +1834,9 @@ struct target_elf_prpsinfo {
char pr_zomb; /* zombie */
char pr_nice; /* nice val */
target_ulong pr_flag; /* flags */
- a_target_uid pr_uid;
- a_target_gid pr_gid;
- a_target_pid pr_pid, pr_ppid, pr_pgrp, pr_sid;
+ target_uid_t pr_uid;
+ target_gid_t pr_gid;
+ target_pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
/* Lots missing */
char pr_fname[16]; /* filename of executable */
char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
diff --git a/linux-user/i386/target_signal.h b/linux-user/i386/target_signal.h
index da86689f1f..9baf7fbeb5 100644
--- a/linux-user/i386/target_signal.h
+++ b/linux-user/i386/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/m68k/target_signal.h b/linux-user/m68k/target_signal.h
index 964c55bce5..479758a421 100644
--- a/linux-user/m68k/target_signal.h
+++ b/linux-user/m68k/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/main.c b/linux-user/main.c
index 4474c9003b..81a1ada50b 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -303,7 +303,7 @@ void cpu_loop(CPUX86State *env)
{
int trapnr;
abi_ulong pc;
- a_target_siginfo info;
+ target_siginfo_t info;
for(;;) {
trapnr = cpu_x86_exec(env);
@@ -528,7 +528,7 @@ void cpu_loop(CPUARMState *env)
{
int trapnr;
unsigned int n, insn;
- a_target_siginfo info;
+ target_siginfo_t info;
uint32_t addr;
for(;;) {
@@ -856,7 +856,7 @@ static void flush_windows(CPUSPARCState *env)
void cpu_loop (CPUSPARCState *env)
{
int trapnr, ret;
- a_target_siginfo info;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_sparc_exec (env);
@@ -1015,12 +1015,12 @@ uint32_t cpu_ppc601_load_rtcl (CPUState *env)
}
/* XXX: to be fixed */
-int ppc_dcr_read (a_ppc_dcr *dcr_env, int dcrn, target_ulong *valp)
+int ppc_dcr_read (ppc_dcr_t *dcr_env, int dcrn, target_ulong *valp)
{
return -1;
}
-int ppc_dcr_write (a_ppc_dcr *dcr_env, int dcrn, target_ulong val)
+int ppc_dcr_write (ppc_dcr_t *dcr_env, int dcrn, target_ulong val)
{
return -1;
}
@@ -1093,7 +1093,7 @@ static int do_store_exclusive(CPUPPCState *env)
void cpu_loop(CPUPPCState *env)
{
- a_target_siginfo info;
+ target_siginfo_t info;
int trapnr;
uint32_t ret;
@@ -1890,7 +1890,7 @@ static int do_store_exclusive(CPUMIPSState *env)
void cpu_loop(CPUMIPSState *env)
{
- a_target_siginfo info;
+ target_siginfo_t info;
int trapnr, ret;
unsigned int syscall_num;
@@ -1999,7 +1999,7 @@ void cpu_loop(CPUMIPSState *env)
void cpu_loop (CPUState *env)
{
int trapnr, ret;
- a_target_siginfo info;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_sh4_exec (env);
@@ -2057,7 +2057,7 @@ void cpu_loop (CPUState *env)
void cpu_loop (CPUState *env)
{
int trapnr, ret;
- a_target_siginfo info;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_cris_exec (env);
@@ -2114,7 +2114,7 @@ void cpu_loop (CPUState *env)
void cpu_loop (CPUState *env)
{
int trapnr, ret;
- a_target_siginfo info;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_mb_exec (env);
@@ -2176,7 +2176,7 @@ void cpu_loop(CPUM68KState *env)
{
int trapnr;
unsigned int n;
- a_target_siginfo info;
+ target_siginfo_t info;
TaskState *ts = env->opaque;
for(;;) {
@@ -2266,7 +2266,7 @@ void cpu_loop(CPUM68KState *env)
void cpu_loop (CPUState *env)
{
int trapnr;
- a_target_siginfo info;
+ target_siginfo_t info;
while (1) {
trapnr = cpu_alpha_exec (env);
diff --git a/linux-user/microblaze/target_signal.h b/linux-user/microblaze/target_signal.h
index a91b21dbdb..3d1f7a7238 100644
--- a/linux-user/microblaze/target_signal.h
+++ b/linux-user/microblaze/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_ulong ss_size;
abi_long ss_flags;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/mips/target_signal.h b/linux-user/mips/target_signal.h
index 13c2d1987a..6e1dc8b6e6 100644
--- a/linux-user/mips/target_signal.h
+++ b/linux-user/mips/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_long ss_sp;
abi_ulong ss_size;
abi_long ss_flags;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/mips64/target_signal.h b/linux-user/mips64/target_signal.h
index 13c2d1987a..6e1dc8b6e6 100644
--- a/linux-user/mips64/target_signal.h
+++ b/linux-user/mips64/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_long ss_sp;
abi_ulong ss_size;
abi_long ss_flags;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/mipsn32/target_signal.h b/linux-user/mipsn32/target_signal.h
index 8946792a9a..ff20d9e33e 100644
--- a/linux-user/mipsn32/target_signal.h
+++ b/linux-user/mipsn32/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
int32_t ss_sp;
uint32_t ss_size;
int32_t ss_flags;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/ppc/target_signal.h b/linux-user/ppc/target_signal.h
index e25d776e40..a93b5cf1df 100644
--- a/linux-user/ppc/target_signal.h
+++ b/linux-user/ppc/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
int ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index 8151c1b4b0..d129debb1f 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -78,7 +78,7 @@ struct vm86_saved_state {
struct sigqueue {
struct sigqueue *next;
- a_target_siginfo info;
+ target_siginfo_t info;
};
struct emulated_sigtable {
@@ -207,9 +207,9 @@ extern int do_strace;
/* signal.c */
void process_pending_signals(CPUState *cpu_env);
void signal_init(void);
-int queue_signal(CPUState *env, int sig, a_target_siginfo *info);
-void host_to_target_siginfo(a_target_siginfo *tinfo, const siginfo_t *info);
-void target_to_host_siginfo(siginfo_t *info, const a_target_siginfo *tinfo);
+int queue_signal(CPUState *env, int sig, target_siginfo_t *info);
+void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
+void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo);
int target_to_host_signal(int sig);
int host_to_target_signal(int sig);
long do_sigreturn(CPUState *env);
diff --git a/linux-user/sh4/target_signal.h b/linux-user/sh4/target_signal.h
index a241a89e13..e148da0925 100644
--- a/linux-user/sh4/target_signal.h
+++ b/linux-user/sh4/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/signal.c b/linux-user/signal.c
index a840ccf6f3..2df17aa21b 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -115,26 +115,26 @@ int target_to_host_signal(int sig)
return target_to_host_signal_table[sig];
}
-static inline void target_sigemptyset(a_target_sigset *set)
+static inline void target_sigemptyset(target_sigset_t *set)
{
memset(set, 0, sizeof(*set));
}
-static inline void target_sigaddset(a_target_sigset *set, int signum)
+static inline void target_sigaddset(target_sigset_t *set, int signum)
{
signum--;
abi_ulong mask = (abi_ulong)1 << (signum % TARGET_NSIG_BPW);
set->sig[signum / TARGET_NSIG_BPW] |= mask;
}
-static inline int target_sigismember(const a_target_sigset *set, int signum)
+static inline int target_sigismember(const target_sigset_t *set, int signum)
{
signum--;
abi_ulong mask = (abi_ulong)1 << (signum % TARGET_NSIG_BPW);
return ((set->sig[signum / TARGET_NSIG_BPW] & mask) != 0);
}
-static void host_to_target_sigset_internal(a_target_sigset *d,
+static void host_to_target_sigset_internal(target_sigset_t *d,
const sigset_t *s)
{
int i;
@@ -146,9 +146,9 @@ static void host_to_target_sigset_internal(a_target_sigset *d,
}
}
-void host_to_target_sigset(a_target_sigset *d, const sigset_t *s)
+void host_to_target_sigset(target_sigset_t *d, const sigset_t *s)
{
- a_target_sigset d1;
+ target_sigset_t d1;
int i;
host_to_target_sigset_internal(&d1, s);
@@ -157,7 +157,7 @@ void host_to_target_sigset(a_target_sigset *d, const sigset_t *s)
}
static void target_to_host_sigset_internal(sigset_t *d,
- const a_target_sigset *s)
+ const target_sigset_t *s)
{
int i;
sigemptyset(d);
@@ -168,9 +168,9 @@ static void target_to_host_sigset_internal(sigset_t *d,
}
}
-void target_to_host_sigset(sigset_t *d, const a_target_sigset *s)
+void target_to_host_sigset(sigset_t *d, const target_sigset_t *s)
{
- a_target_sigset s1;
+ target_sigset_t s1;
int i;
for(i = 0;i < TARGET_NSIG_WORDS; i++)
@@ -181,7 +181,7 @@ void target_to_host_sigset(sigset_t *d, const a_target_sigset *s)
void host_to_target_old_sigset(abi_ulong *old_sigset,
const sigset_t *sigset)
{
- a_target_sigset d;
+ target_sigset_t d;
host_to_target_sigset(&d, sigset);
*old_sigset = d.sig[0];
}
@@ -189,7 +189,7 @@ void host_to_target_old_sigset(abi_ulong *old_sigset,
void target_to_host_old_sigset(sigset_t *sigset,
const abi_ulong *old_sigset)
{
- a_target_sigset d;
+ target_sigset_t d;
int i;
d.sig[0] = *old_sigset;
@@ -200,7 +200,7 @@ void target_to_host_old_sigset(sigset_t *sigset,
/* siginfo conversion */
-static inline void host_to_target_siginfo_noswap(a_target_siginfo *tinfo,
+static inline void host_to_target_siginfo_noswap(target_siginfo_t *tinfo,
const siginfo_t *info)
{
int sig;
@@ -224,8 +224,8 @@ static inline void host_to_target_siginfo_noswap(a_target_siginfo *tinfo,
}
}
-static void tswap_siginfo(a_target_siginfo *tinfo,
- const a_target_siginfo *info)
+static void tswap_siginfo(target_siginfo_t *tinfo,
+ const target_siginfo_t *info)
{
int sig;
sig = info->si_signo;
@@ -247,7 +247,7 @@ static void tswap_siginfo(a_target_siginfo *tinfo,
}
-void host_to_target_siginfo(a_target_siginfo *tinfo, const siginfo_t *info)
+void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info)
{
host_to_target_siginfo_noswap(tinfo, info);
tswap_siginfo(tinfo, tinfo);
@@ -255,7 +255,7 @@ void host_to_target_siginfo(a_target_siginfo *tinfo, const siginfo_t *info)
/* XXX: we support only POSIX RT signals are used. */
/* XXX: find a solution for 64 bit (additional malloced data is needed) */
-void target_to_host_siginfo(siginfo_t *info, const a_target_siginfo *tinfo)
+void target_to_host_siginfo(siginfo_t *info, const target_siginfo_t *tinfo)
{
info->si_signo = tswap32(tinfo->si_signo);
info->si_errno = tswap32(tinfo->si_errno);
@@ -417,7 +417,7 @@ static void QEMU_NORETURN force_sig(int sig)
/* queue a signal so that it will be send to the virtual CPU as soon
as possible */
-int queue_signal(CPUState *env, int sig, a_target_siginfo *info)
+int queue_signal(CPUState *env, int sig, target_siginfo_t *info)
{
TaskState *ts = env->opaque;
struct emulated_sigtable *k;
@@ -485,7 +485,7 @@ static void host_signal_handler(int host_signum, siginfo_t *info,
void *puc)
{
int sig;
- a_target_siginfo tinfo;
+ target_siginfo_t tinfo;
/* the CPU emulator uses some host signals to detect exceptions,
we forward to it some signals */
@@ -630,8 +630,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
return ret;
}
-static inline int copy_siginfo_to_user(a_target_siginfo *tinfo,
- const a_target_siginfo *info)
+static inline int copy_siginfo_to_user(target_siginfo_t *tinfo,
+ const target_siginfo_t *info)
{
tswap_siginfo(tinfo, info);
return 0;
@@ -714,9 +714,9 @@ struct target_sigcontext {
struct target_ucontext {
abi_ulong tuc_flags;
abi_ulong tuc_link;
- a_target_stack tuc_stack;
+ target_stack_t tuc_stack;
struct target_sigcontext tuc_mcontext;
- a_target_sigset tuc_sigmask; /* mask last for extensibility */
+ target_sigset_t tuc_sigmask; /* mask last for extensibility */
};
struct sigframe
@@ -815,7 +815,7 @@ get_sigframe(struct target_sigaction *ka, CPUX86State *env, size_t frame_size)
/* compare linux/arch/i386/kernel/signal.c:setup_frame() */
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUX86State *env)
+ target_sigset_t *set, CPUX86State *env)
{
abi_ulong frame_addr;
struct sigframe *frame;
@@ -884,8 +884,8 @@ give_sigsegv:
/* compare linux/arch/i386/kernel/signal.c:setup_rt_frame() */
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUX86State *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUX86State *env)
{
abi_ulong frame_addr, addr;
struct rt_sigframe *frame;
@@ -1008,7 +1008,7 @@ long do_sigreturn(CPUX86State *env)
{
struct sigframe *frame;
abi_ulong frame_addr = env->regs[R_ESP] - 8;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
int eax, i;
@@ -1098,17 +1098,17 @@ struct target_sigcontext {
struct target_ucontext_v1 {
abi_ulong tuc_flags;
abi_ulong tuc_link;
- a_target_stack tuc_stack;
+ target_stack_t tuc_stack;
struct target_sigcontext tuc_mcontext;
- a_target_sigset tuc_sigmask; /* mask last for extensibility */
+ target_sigset_t tuc_sigmask; /* mask last for extensibility */
};
struct target_ucontext_v2 {
abi_ulong tuc_flags;
abi_ulong tuc_link;
- a_target_stack tuc_stack;
+ target_stack_t tuc_stack;
struct target_sigcontext tuc_mcontext;
- a_target_sigset tuc_sigmask; /* mask last for extensibility */
+ target_sigset_t tuc_sigmask; /* mask last for extensibility */
char __unused[128 - sizeof(sigset_t)];
abi_ulong tuc_regspace[128] __attribute__((__aligned__(8)));
};
@@ -1257,7 +1257,7 @@ setup_return(CPUState *env, struct target_sigaction *ka,
}
static void setup_sigframe_v2(struct target_ucontext_v2 *uc,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
struct target_sigaltstack stack;
int i;
@@ -1280,7 +1280,7 @@ static void setup_sigframe_v2(struct target_ucontext_v2 *uc,
/* compare linux/arch/arm/kernel/signal.c:setup_frame() */
static void setup_frame_v1(int usig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *regs)
+ target_sigset_t *set, CPUState *regs)
{
struct sigframe_v1 *frame;
abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame));
@@ -1304,7 +1304,7 @@ end:
}
static void setup_frame_v2(int usig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *regs)
+ target_sigset_t *set, CPUState *regs)
{
struct sigframe_v2 *frame;
abi_ulong frame_addr = get_sigframe(ka, regs, sizeof(*frame));
@@ -1321,7 +1321,7 @@ static void setup_frame_v2(int usig, struct target_sigaction *ka,
}
static void setup_frame(int usig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *regs)
+ target_sigset_t *set, CPUState *regs)
{
if (get_osversion() >= 0x020612) {
setup_frame_v2(usig, ka, set, regs);
@@ -1332,8 +1332,8 @@ static void setup_frame(int usig, struct target_sigaction *ka,
/* compare linux/arch/arm/kernel/signal.c:setup_rt_frame() */
static void setup_rt_frame_v1(int usig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
struct rt_sigframe_v1 *frame;
abi_ulong frame_addr = get_sigframe(ka, env, sizeof(*frame));
@@ -1376,8 +1376,8 @@ end:
}
static void setup_rt_frame_v2(int usig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
struct rt_sigframe_v2 *frame;
abi_ulong frame_addr = get_sigframe(ka, env, sizeof(*frame));
@@ -1402,8 +1402,8 @@ static void setup_rt_frame_v2(int usig, struct target_sigaction *ka,
}
static void setup_rt_frame(int usig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
if (get_osversion() >= 0x020612) {
setup_rt_frame_v2(usig, ka, info, set, env);
@@ -1448,7 +1448,7 @@ static long do_sigreturn_v1(CPUState *env)
{
abi_ulong frame_addr;
struct sigframe_v1 *frame;
- a_target_sigset set;
+ target_sigset_t set;
sigset_t host_set;
int i;
@@ -1691,7 +1691,7 @@ typedef struct {
unsigned long *insn_addr;
unsigned long insn;
} si_fpqueue [16];
-} a_qemu_siginfo_fpu;
+} qemu_siginfo_fpu_t;
struct target_signal_frame {
@@ -1701,7 +1701,7 @@ struct target_signal_frame {
abi_ulong insns[2] __attribute__ ((aligned (8)));
abi_ulong extramask[TARGET_NSIG_WORDS - 1];
abi_ulong extra_size; /* Should be 0 */
- a_qemu_siginfo_fpu fpu_state;
+ qemu_siginfo_fpu_t fpu_state;
};
struct target_rt_signal_frame {
struct sparc_stackf ss;
@@ -1712,7 +1712,7 @@ struct target_rt_signal_frame {
unsigned int insns[2];
stack_t stack;
unsigned int extra_size; /* Should be 0 */
- a_qemu_siginfo_fpu fpu_state;
+ qemu_siginfo_fpu_t fpu_state;
};
#define UREG_O0 16
@@ -1785,7 +1785,7 @@ setup_sigcontext(struct target_sigcontext *sc, /*struct _fpstate *fpstate,*/
#define NF_ALIGNEDSZ (((sizeof(struct target_signal_frame) + 7) & (~7)))
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
abi_ulong sf_addr;
struct target_signal_frame *sf;
@@ -1874,7 +1874,7 @@ sigsegv:
force_sig(TARGET_SIGSEGV);
}
static inline int
-restore_fpu_state(CPUState *env, a_qemu_siginfo_fpu *fpu)
+restore_fpu_state(CPUState *env, qemu_siginfo_fpu_t *fpu)
{
int err;
#if 0
@@ -1914,8 +1914,8 @@ restore_fpu_state(CPUState *env, a_qemu_siginfo_fpu *fpu)
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
@@ -1925,7 +1925,7 @@ long do_sigreturn(CPUState *env)
abi_ulong sf_addr;
struct target_signal_frame *sf;
uint32_t up_psr, pc, npc;
- a_target_sigset set;
+ target_sigset_t set;
sigset_t host_set;
abi_ulong fpu_save_addr;
int err, i;
@@ -2021,8 +2021,8 @@ long do_rt_sigreturn(CPUState *env)
#define MC_O7 18
#define MC_NGREG 19
-typedef abi_ulong a_target_mc_greg;
-typedef a_target_mc_greg a_target_mc_gregset[MC_NGREG];
+typedef abi_ulong target_mc_greg_t;
+typedef target_mc_greg_t target_mc_gregset_t[MC_NGREG];
struct target_mc_fq {
abi_ulong *mcfq_addr;
@@ -2043,20 +2043,20 @@ struct target_mc_fpu {
unsigned char mcfpu_qentsz;
unsigned char mcfpu_enab;
};
-typedef struct target_mc_fpu a_target_mc_fpu;
+typedef struct target_mc_fpu target_mc_fpu_t;
typedef struct {
- a_target_mc_gregset mc_gregs;
- a_target_mc_greg mc_fp;
- a_target_mc_greg mc_i7;
- a_target_mc_fpu mc_fpregs;
-} a_target_mcontext;
+ target_mc_gregset_t mc_gregs;
+ target_mc_greg_t mc_fp;
+ target_mc_greg_t mc_i7;
+ target_mc_fpu_t mc_fpregs;
+} target_mcontext_t;
struct target_ucontext {
struct target_ucontext *uc_link;
abi_ulong uc_flags;
- a_target_sigset uc_sigmask;
- a_target_mcontext uc_mcontext;
+ target_sigset_t uc_sigmask;
+ target_mcontext_t uc_mcontext;
};
/* A V9 register window */
@@ -2072,7 +2072,7 @@ void sparc64_set_context(CPUSPARCState *env)
{
abi_ulong ucp_addr;
struct target_ucontext *ucp;
- a_target_mc_gregset *grp;
+ target_mc_gregset_t *grp;
abi_ulong pc, npc, tstate;
abi_ulong fp, i7, w_addr;
unsigned char fenab;
@@ -2088,7 +2088,7 @@ void sparc64_set_context(CPUSPARCState *env)
if (err || ((pc | npc) & 3))
goto do_sigsegv;
if (env->regwptr[UREG_I1]) {
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
if (TARGET_NSIG_WORDS == 1) {
@@ -2098,7 +2098,7 @@ void sparc64_set_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = ucp->uc_sigmask.sig;
dst = target_set.sig;
- for (i = 0; i < sizeof(a_target_sigset) / sizeof(abi_ulong);
+ for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
i++, dst++, src++)
err |= __get_user(*dst, src);
if (err)
@@ -2167,12 +2167,12 @@ void sparc64_get_context(CPUSPARCState *env)
{
abi_ulong ucp_addr;
struct target_ucontext *ucp;
- a_target_mc_gregset *grp;
- a_target_mcontext *mcp;
+ target_mc_gregset_t *grp;
+ target_mcontext_t *mcp;
abi_ulong fp, i7, w_addr;
int err;
unsigned int i;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
ucp_addr = env->regwptr[UREG_I0];
@@ -2197,7 +2197,7 @@ void sparc64_get_context(CPUSPARCState *env)
abi_ulong *src, *dst;
src = target_set.sig;
dst = ucp->uc_sigmask.sig;
- for (i = 0; i < sizeof(a_target_sigset) / sizeof(abi_ulong);
+ for (i = 0; i < sizeof(target_sigset_t) / sizeof(abi_ulong);
i++, dst++, src++)
err |= __put_user(*src, dst);
if (err)
@@ -2262,14 +2262,14 @@ void sparc64_get_context(CPUSPARCState *env)
# warning signal handling not implemented
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_frame: not implemented\n");
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
@@ -2291,14 +2291,14 @@ long do_rt_sigreturn(CPUState *env)
# warning signal handling not implemented
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_frame: not implemented\n");
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
@@ -2343,16 +2343,16 @@ struct sigframe {
uint32_t sf_ass[4]; /* argument save space for o32 */
uint32_t sf_code[2]; /* signal trampoline */
struct target_sigcontext sf_sc;
- a_target_sigset sf_mask;
+ target_sigset_t sf_mask;
};
struct target_ucontext {
target_ulong uc_flags;
target_ulong uc_link;
- a_target_stack uc_stack;
+ target_stack_t uc_stack;
target_ulong pad0;
struct target_sigcontext uc_mcontext;
- a_target_sigset uc_sigmask;
+ target_sigset_t uc_sigmask;
};
struct target_rt_sigframe {
@@ -2551,7 +2551,7 @@ get_sigframe(struct target_sigaction *ka, CPUState *regs, size_t frame_size)
/* compare linux/arch/mips/kernel/signal.c:setup_frame() */
static void setup_frame(int sig, struct target_sigaction * ka,
- a_target_sigset *set, CPUState *regs)
+ target_sigset_t *set, CPUState *regs)
{
struct sigframe *frame;
abi_ulong frame_addr;
@@ -2604,7 +2604,7 @@ long do_sigreturn(CPUState *regs)
struct sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
- a_target_sigset target_set;
+ target_sigset_t target_set;
int i;
#if defined(DEBUG_SIGNAL)
@@ -2649,8 +2649,8 @@ badframe:
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
@@ -2782,9 +2782,9 @@ struct target_sigframe
struct target_ucontext {
target_ulong uc_flags;
struct target_ucontext *uc_link;
- a_target_stack uc_stack;
+ target_stack_t uc_stack;
struct target_sigcontext uc_mcontext;
- a_target_sigset uc_sigmask; /* mask last for extensibility */
+ target_sigset_t uc_sigmask; /* mask last for extensibility */
};
struct target_rt_sigframe
@@ -2861,7 +2861,7 @@ static int restore_sigcontext(CPUState *regs,
}
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *regs)
+ target_sigset_t *set, CPUState *regs)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
@@ -2912,8 +2912,8 @@ give_sigsegv:
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *regs)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *regs)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
@@ -2979,7 +2979,7 @@ long do_sigreturn(CPUState *regs)
struct target_sigframe *frame;
abi_ulong frame_addr;
sigset_t blocked;
- a_target_sigset target_set;
+ target_sigset_t target_set;
int i;
int err = 0;
@@ -3151,7 +3151,7 @@ static abi_ulong get_sigframe(struct target_sigaction *ka,
}
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
@@ -3214,8 +3214,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "Microblaze setup_rt_frame: not implemented\n");
}
@@ -3224,7 +3224,7 @@ long do_sigreturn(CPUState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
int i;
@@ -3339,7 +3339,7 @@ static abi_ulong get_sigframe(CPUState *env, int framesize)
}
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
@@ -3389,8 +3389,8 @@ static void setup_frame(int sig, struct target_sigaction *ka,
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "CRIS setup_rt_frame: not implemented\n");
}
@@ -3399,7 +3399,7 @@ long do_sigreturn(CPUState *env)
{
struct target_signal_frame *frame;
abi_ulong frame_addr;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
int i;
@@ -3537,7 +3537,7 @@ struct target_mcontext {
#else
#define QEMU_NVRREG 33
#endif
- union ppc_avr altivec[QEMU_NVRREG];
+ ppc_avr_t altivec[QEMU_NVRREG];
#undef QEMU_NVRREG
} mc_vregs __attribute__((__aligned__(16)));
};
@@ -3551,9 +3551,9 @@ struct target_ucontext {
target_ulong uc_regs; /* struct mcontext __user *
points to uc_mcontext field */
#endif
- a_target_sigset uc_sigmask;
+ target_sigset_t uc_sigmask;
#if defined(TARGET_PPC64)
- a_target_sigset unused[15]; /* Allow for uc_sigmask growth */
+ target_sigset_t unused[15]; /* Allow for uc_sigmask growth */
struct target_sigcontext uc_mcontext;
#else
int32_t uc_maskext[30];
@@ -3630,8 +3630,8 @@ static int save_user_regs(CPUState *env, struct target_mcontext *frame,
/* Save Altivec registers if necessary. */
if (env->insns_flags & PPC_ALTIVEC) {
for (i = 0; i < ARRAY_SIZE(env->avr); i++) {
- union ppc_avr *avr = &env->avr[i];
- union ppc_avr *vreg = &frame->mc_vregs.altivec[i];
+ ppc_avr_t *avr = &env->avr[i];
+ ppc_avr_t *vreg = &frame->mc_vregs.altivec[i];
if (__put_user(avr->u64[0], &vreg->u64[0]) ||
__put_user(avr->u64[1], &vreg->u64[1])) {
@@ -3739,8 +3739,8 @@ static int restore_user_regs(CPUState *env,
/* Restore Altivec registers if necessary. */
if (env->insns_flags & PPC_ALTIVEC) {
for (i = 0; i < ARRAY_SIZE(env->avr); i++) {
- union ppc_avr *avr = &env->avr[i];
- union ppc_avr *vreg = &frame->mc_vregs.altivec[i];
+ ppc_avr_t *avr = &env->avr[i];
+ ppc_avr_t *vreg = &frame->mc_vregs.altivec[i];
if (__get_user(avr->u64[0], &vreg->u64[0]) ||
__get_user(avr->u64[1], &vreg->u64[1])) {
@@ -3793,7 +3793,7 @@ static int restore_user_regs(CPUState *env,
}
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
struct target_sigframe *frame;
struct target_sigcontext *sc;
@@ -3854,8 +3854,8 @@ sigsegv:
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
struct target_rt_sigframe *rt_sf;
struct target_mcontext *frame;
@@ -3929,7 +3929,7 @@ long do_sigreturn(CPUState *env)
struct target_mcontext *sr = NULL;
target_ulong sr_addr, sc_addr;
sigset_t blocked;
- a_target_sigset set;
+ target_sigset_t set;
sc_addr = env->gpr[1] + SIGNAL_FRAMESIZE;
if (!lock_user_struct(VERIFY_READ, sc, sc_addr, 1))
@@ -3971,7 +3971,7 @@ static int do_setcontext(struct target_ucontext *ucp, CPUState *env, int sig)
struct target_mcontext *mcp;
target_ulong mcp_addr;
sigset_t blocked;
- a_target_sigset set;
+ target_sigset_t set;
if (copy_from_user(&set, h2g(ucp) + offsetof(struct target_ucontext, uc_sigmask),
sizeof (set)))
@@ -4052,19 +4052,19 @@ struct target_sigframe
struct target_sigcontext sc;
};
-typedef int a_target_greg;
+typedef int target_greg_t;
#define TARGET_NGREG 18
-typedef a_target_greg a_target_gregset[TARGET_NGREG];
+typedef target_greg_t target_gregset_t[TARGET_NGREG];
typedef struct target_fpregset {
int f_fpcntl[3];
int f_fpregs[8*3];
-} a_target_fpregset;
+} target_fpregset_t;
struct target_mcontext {
int version;
- a_target_gregset gregs;
- a_target_fpregset fpregs;
+ target_gregset_t gregs;
+ target_fpregset_t fpregs;
};
#define TARGET_MCONTEXT_VERSION 2
@@ -4072,10 +4072,10 @@ struct target_mcontext {
struct target_ucontext {
abi_ulong uc_flags;
abi_ulong uc_link;
- a_target_stack uc_stack;
+ target_stack_t uc_stack;
struct target_mcontext uc_mcontext;
abi_long uc_filler[80];
- a_target_sigset uc_sigmask;
+ target_sigset_t uc_sigmask;
};
struct target_rt_sigframe
@@ -4144,7 +4144,7 @@ get_sigframe(struct target_sigaction *ka, CPUState *regs, size_t frame_size)
}
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
struct target_sigframe *frame;
abi_ulong frame_addr;
@@ -4200,7 +4200,7 @@ give_sigsegv:
static inline int target_rt_setup_ucontext(struct target_ucontext *uc,
CPUState *env)
{
- a_target_greg *gregs = uc->uc_mcontext.gregs;
+ target_greg_t *gregs = uc->uc_mcontext.gregs;
int err;
err = __put_user(TARGET_MCONTEXT_VERSION, &uc->uc_mcontext.version);
@@ -4232,7 +4232,7 @@ static inline int target_rt_restore_ucontext(CPUState *env,
{
int temp;
int err;
- a_target_greg *gregs = uc->uc_mcontext.gregs;
+ target_greg_t *gregs = uc->uc_mcontext.gregs;
err = __get_user(temp, &uc->uc_mcontext.version);
if (temp != TARGET_MCONTEXT_VERSION)
@@ -4267,8 +4267,8 @@ badframe:
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr;
@@ -4343,7 +4343,7 @@ long do_sigreturn(CPUState *env)
{
struct target_sigframe *frame;
abi_ulong frame_addr = env->aregs[7] - 4;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
int d0, i;
@@ -4381,7 +4381,7 @@ long do_rt_sigreturn(CPUState *env)
{
struct target_rt_sigframe *frame;
abi_ulong frame_addr = env->aregs[7] - 4;
- a_target_sigset target_set;
+ target_sigset_t target_set;
sigset_t set;
int d0;
@@ -4413,14 +4413,14 @@ badframe:
#else
static void setup_frame(int sig, struct target_sigaction *ka,
- a_target_sigset *set, CPUState *env)
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_frame: not implemented\n");
}
static void setup_rt_frame(int sig, struct target_sigaction *ka,
- a_target_siginfo *info,
- a_target_sigset *set, CPUState *env)
+ target_siginfo_t *info,
+ target_sigset_t *set, CPUState *env)
{
fprintf(stderr, "setup_rt_frame: not implemented\n");
}
@@ -4444,7 +4444,7 @@ void process_pending_signals(CPUState *cpu_env)
int sig;
abi_ulong handler;
sigset_t set, old_set;
- a_target_sigset target_old_set;
+ target_sigset_t target_old_set;
struct emulated_sigtable *k;
struct target_sigaction *sa;
struct sigqueue *q;
diff --git a/linux-user/sparc/target_signal.h b/linux-user/sparc/target_signal.h
index a63ee7f6dc..c7de300cd7 100644
--- a/linux-user/sparc/target_signal.h
+++ b/linux-user/sparc/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/sparc64/target_signal.h b/linux-user/sparc64/target_signal.h
index a63ee7f6dc..c7de300cd7 100644
--- a/linux-user/sparc64/target_signal.h
+++ b/linux-user/sparc64/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0fd6f7813d..bf06d14fc7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4255,10 +4255,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
info.si_pid = 0;
ret = get_errno(waitid(arg1, arg2, &info, arg4));
if (!is_error(ret) && arg3 && info.si_pid != 0) {
- if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(a_target_siginfo), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(target_siginfo_t), 0)))
goto efault;
host_to_target_siginfo(p, &info);
- unlock_user(p, arg3, sizeof(a_target_siginfo));
+ unlock_user(p, arg3, sizeof(target_siginfo_t));
}
}
break;
@@ -4888,7 +4888,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = -TARGET_EINVAL;
goto fail;
}
- if (!(p = lock_user(VERIFY_READ, arg2, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg2, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_old_sigset(&set, p);
unlock_user(p, arg2, 0);
@@ -4899,10 +4899,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
ret = get_errno(sigprocmask(arg1, set_ptr, &oldset));
if (!is_error(ret) && arg3) {
- if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(a_target_sigset), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(target_sigset_t), 0)))
goto efault;
host_to_target_old_sigset(p, &oldset);
- unlock_user(p, arg3, sizeof(a_target_sigset));
+ unlock_user(p, arg3, sizeof(target_sigset_t));
}
}
break;
@@ -4927,7 +4927,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
ret = -TARGET_EINVAL;
goto fail;
}
- if (!(p = lock_user(VERIFY_READ, arg2, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg2, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_sigset(&set, p);
unlock_user(p, arg2, 0);
@@ -4938,10 +4938,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
ret = get_errno(sigprocmask(how, set_ptr, &oldset));
if (!is_error(ret) && arg3) {
- if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(a_target_sigset), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg3, sizeof(target_sigset_t), 0)))
goto efault;
host_to_target_sigset(p, &oldset);
- unlock_user(p, arg3, sizeof(a_target_sigset));
+ unlock_user(p, arg3, sizeof(target_sigset_t));
}
}
break;
@@ -4951,10 +4951,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
sigset_t set;
ret = get_errno(sigpending(&set));
if (!is_error(ret)) {
- if (!(p = lock_user(VERIFY_WRITE, arg1, sizeof(a_target_sigset), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg1, sizeof(target_sigset_t), 0)))
goto efault;
host_to_target_old_sigset(p, &set);
- unlock_user(p, arg1, sizeof(a_target_sigset));
+ unlock_user(p, arg1, sizeof(target_sigset_t));
}
}
break;
@@ -4964,10 +4964,10 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
sigset_t set;
ret = get_errno(sigpending(&set));
if (!is_error(ret)) {
- if (!(p = lock_user(VERIFY_WRITE, arg1, sizeof(a_target_sigset), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg1, sizeof(target_sigset_t), 0)))
goto efault;
host_to_target_sigset(p, &set);
- unlock_user(p, arg1, sizeof(a_target_sigset));
+ unlock_user(p, arg1, sizeof(target_sigset_t));
}
}
break;
@@ -4975,7 +4975,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_sigsuspend:
{
sigset_t set;
- if (!(p = lock_user(VERIFY_READ, arg1, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg1, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_old_sigset(&set, p);
unlock_user(p, arg1, 0);
@@ -4986,7 +4986,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_rt_sigsuspend:
{
sigset_t set;
- if (!(p = lock_user(VERIFY_READ, arg1, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg1, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_sigset(&set, p);
unlock_user(p, arg1, 0);
@@ -4999,7 +4999,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
struct timespec uts, *puts;
siginfo_t uinfo;
- if (!(p = lock_user(VERIFY_READ, arg1, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg1, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_sigset(&set, p);
unlock_user(p, arg1, 0);
@@ -5011,17 +5011,17 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
}
ret = get_errno(sigtimedwait(&set, &uinfo, puts));
if (!is_error(ret) && arg2) {
- if (!(p = lock_user(VERIFY_WRITE, arg2, sizeof(a_target_siginfo), 0)))
+ if (!(p = lock_user(VERIFY_WRITE, arg2, sizeof(target_siginfo_t), 0)))
goto efault;
host_to_target_siginfo(p, &uinfo);
- unlock_user(p, arg2, sizeof(a_target_siginfo));
+ unlock_user(p, arg2, sizeof(target_siginfo_t));
}
}
break;
case TARGET_NR_rt_sigqueueinfo:
{
siginfo_t uinfo;
- if (!(p = lock_user(VERIFY_READ, arg3, sizeof(a_target_sigset), 1)))
+ if (!(p = lock_user(VERIFY_READ, arg3, sizeof(target_sigset_t), 1)))
goto efault;
target_to_host_siginfo(&uinfo, p);
unlock_user(p, arg1, 0);
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index fa3950ad33..c018165bf3 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -148,15 +148,15 @@ struct target_itimerval {
struct target_timeval it_value;
};
-typedef abi_long a_target_clock;
+typedef abi_long target_clock_t;
#define TARGET_HZ 100
struct target_tms {
- a_target_clock tms_utime;
- a_target_clock tms_stime;
- a_target_clock tms_cutime;
- a_target_clock tms_cstime;
+ target_clock_t tms_utime;
+ target_clock_t tms_stime;
+ target_clock_t tms_cutime;
+ target_clock_t tms_cstime;
};
struct target_utimbuf {
@@ -235,7 +235,7 @@ struct target_rusage {
typedef struct {
int val[2];
-} a_kernel_fsid;
+} kernel_fsid_t;
struct kernel_statfs {
int f_type;
@@ -245,7 +245,7 @@ struct kernel_statfs {
int f_bavail;
int f_files;
int f_ffree;
- a_kernel_fsid f_fsid;
+ kernel_fsid_t f_fsid;
int f_namelen;
int f_spare[6];
};
@@ -281,23 +281,23 @@ struct target_dirent64 {
typedef struct {
abi_ulong sig[TARGET_NSIG_WORDS];
-} a_target_sigset;
+} target_sigset_t;
#ifdef BSWAP_NEEDED
-static inline void tswap_sigset(a_target_sigset *d, const a_target_sigset *s)
+static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s)
{
int i;
for(i = 0;i < TARGET_NSIG_WORDS; i++)
d->sig[i] = tswapl(s->sig[i]);
}
#else
-static inline void tswap_sigset(a_target_sigset *d, const a_target_sigset *s)
+static inline void tswap_sigset(target_sigset_t *d, const target_sigset_t *s)
{
*d = *s;
}
#endif
-static inline void target_siginitset(a_target_sigset *d, abi_ulong set)
+static inline void target_siginitset(target_sigset_t *d, abi_ulong set)
{
int i;
d->sig[0] = set;
@@ -305,8 +305,8 @@ static inline void target_siginitset(a_target_sigset *d, abi_ulong set)
d->sig[i] = 0;
}
-void host_to_target_sigset(a_target_sigset *d, const sigset_t *s);
-void target_to_host_sigset(sigset_t *d, const a_target_sigset *s);
+void host_to_target_sigset(target_sigset_t *d, const sigset_t *s);
+void target_to_host_sigset(sigset_t *d, const target_sigset_t *s);
void host_to_target_old_sigset(abi_ulong *old_sigset,
const sigset_t *sigset);
void target_to_host_old_sigset(sigset_t *sigset,
@@ -481,7 +481,7 @@ struct target_sigaction {
#else
abi_ulong _sa_handler;
#endif
- a_target_sigset sa_mask;
+ target_sigset_t sa_mask;
};
#else
@@ -496,14 +496,14 @@ struct target_sigaction {
abi_ulong _sa_handler;
abi_ulong sa_flags;
abi_ulong sa_restorer;
- a_target_sigset sa_mask;
+ target_sigset_t sa_mask;
};
#endif
typedef union target_sigval {
int sival_int;
abi_ulong sival_ptr;
-} a_target_sigval;
+} target_sigval_t;
#if 0
#if defined (TARGET_SPARC)
typedef struct {
@@ -562,7 +562,7 @@ typedef struct target_siginfo {
struct {
pid_t _pid; /* sender's pid */
uid_t _uid; /* sender's uid */
- a_target_sigval _sigval;
+ target_sigval_t _sigval;
} _rt;
/* SIGCHLD */
@@ -570,8 +570,8 @@ typedef struct target_siginfo {
pid_t _pid; /* which child */
uid_t _uid; /* sender's uid */
int _status; /* exit code */
- a_target_clock _utime;
- a_target_clock _stime;
+ target_clock_t _utime;
+ target_clock_t _stime;
} _sigchld;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS */
@@ -585,7 +585,7 @@ typedef struct target_siginfo {
int _fd;
} _sigpoll;
} _sifields;
-} a_target_siginfo;
+} target_siginfo_t;
/*
* si_code values
@@ -1623,7 +1623,7 @@ struct target_stat {
typedef struct {
int val[2];
-} a_target_fsid;
+} target_fsid_t;
#ifdef TARGET_MIPS
#ifdef TARGET_ABI_MIPSN32
@@ -1638,7 +1638,7 @@ struct target_statfs {
int32_t f_bavail;
/* Linux specials */
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
int32_t f_namelen;
int32_t f_spare[6];
};
@@ -1654,7 +1654,7 @@ struct target_statfs {
abi_long f_bavail;
/* Linux specials */
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
abi_long f_namelen;
abi_long f_spare[6];
};
@@ -1670,7 +1670,7 @@ struct target_statfs64 {
uint64_t f_files;
uint64_t f_ffree;
uint64_t f_bavail;
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
uint32_t f_namelen;
uint32_t f_spare[6];
};
@@ -1684,7 +1684,7 @@ struct target_statfs {
abi_long f_bavail;
abi_long f_files;
abi_long f_ffree;
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
abi_long f_namelen;
abi_long f_frsize;
abi_long f_spare[5];
@@ -1698,7 +1698,7 @@ struct target_statfs64 {
abi_long f_bavail;
abi_long f_files;
abi_long f_ffree;
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
abi_long f_namelen;
abi_long f_frsize;
abi_long f_spare[5];
@@ -1712,7 +1712,7 @@ struct target_statfs {
uint32_t f_bavail;
uint32_t f_files;
uint32_t f_ffree;
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
uint32_t f_namelen;
uint32_t f_frsize;
uint32_t f_spare[5];
@@ -1726,7 +1726,7 @@ struct target_statfs64 {
uint64_t f_bavail;
uint64_t f_files;
uint64_t f_ffree;
- a_target_fsid f_fsid;
+ target_fsid_t f_fsid;
uint32_t f_namelen;
uint32_t f_frsize;
uint32_t f_spare[5];
diff --git a/linux-user/x86_64/target_signal.h b/linux-user/x86_64/target_signal.h
index da86689f1f..9baf7fbeb5 100644
--- a/linux-user/x86_64/target_signal.h
+++ b/linux-user/x86_64/target_signal.h
@@ -9,7 +9,7 @@ typedef struct target_sigaltstack {
abi_ulong ss_sp;
abi_long ss_flags;
abi_ulong ss_size;
-} a_target_stack;
+} target_stack_t;
/*
diff --git a/linux-user/x86_64/termbits.h b/linux-user/x86_64/termbits.h
index b958549af1..1c3445c6a2 100644
--- a/linux-user/x86_64/termbits.h
+++ b/linux-user/x86_64/termbits.h
@@ -1,15 +1,15 @@
#define TARGET_NCCS 19
-typedef unsigned char a_target_cc;
-typedef unsigned int a_target_speed;
-typedef unsigned int a_target_tcflag;
+typedef unsigned char target_cc_t;
+typedef unsigned int target_speed_t;
+typedef unsigned int target_tcflag_t;
struct target_termios {
- a_target_tcflag c_iflag; /* input mode flags */
- a_target_tcflag c_oflag; /* output mode flags */
- a_target_tcflag c_cflag; /* control mode flags */
- a_target_tcflag c_lflag; /* local mode flags */
- a_target_cc c_line; /* line discipline */
- a_target_cc c_cc[TARGET_NCCS]; /* control characters */
+ target_tcflag_t c_iflag; /* input mode flags */
+ target_tcflag_t c_oflag; /* output mode flags */
+ target_tcflag_t c_cflag; /* control mode flags */
+ target_tcflag_t c_lflag; /* local mode flags */
+ target_cc_t c_line; /* line discipline */
+ target_cc_t c_cc[TARGET_NCCS]; /* control characters */
};
/* c_cc characters */