Skip to content

Commit

Permalink
build: [linux-user] Rename "syscall.h" to "target_syscall.h" in targe…
Browse files Browse the repository at this point in the history
…t directories

This fixes double-definitions in linux-user builds when using the UST
tracing backend (which indirectly includes the system's "syscall.h").

Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
  • Loading branch information
Lluís Vilanova authored and Riku Voipio committed Feb 23, 2016
1 parent 5089c7c commit 460c579
Show file tree
Hide file tree
Showing 19 changed files with 67 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

struct target_pt_regs {
uint64_t regs[31];
uint64_t sp;
Expand All @@ -11,3 +14,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* default linux values for the selectors */
#define __USER_DS (1)

Expand Down Expand Up @@ -255,3 +258,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 4096
#define TARGET_MLOCKALL_MCL_CURRENT 0x2000
#define TARGET_MLOCKALL_MCL_FUTURE 0x4000

#endif /* TARGET_SYSCALL_H */
4 changes: 4 additions & 0 deletions linux-user/arm/syscall.h → linux-user/arm/target_syscall.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* this struct defines the way the registers are stored on the
stack during a system call. */
Expand Down Expand Up @@ -48,3 +50,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* default linux values for the selectors */
#define __USER_CS (0x23)
#define __USER_DS (0x2B)
Expand Down Expand Up @@ -150,3 +153,5 @@ struct target_vm86plus_struct {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* this struct defines the way the registers are stored on the
stack during a system call. */
Expand All @@ -23,3 +25,5 @@ struct target_pt_regs {
#define TARGET_MLOCKALL_MCL_FUTURE 2

void do_m68k_simcall(CPUM68KState *, int);

#endif /* TARGET_SYSCALL_H */
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* this struct defines the way the registers are stored on the
stack during a system call. */
Expand Down Expand Up @@ -231,3 +233,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* this struct defines the way the registers are stored on the
stack during a system call. */
Expand Down Expand Up @@ -228,3 +230,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

struct target_pt_regs {
union {
struct {
Expand Down Expand Up @@ -27,3 +30,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
5 changes: 5 additions & 0 deletions linux-user/ppc/syscall.h → linux-user/ppc/target_syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* XXX: ABSOLUTELY BUGGY:
* for now, this is quite just a cut-and-paste from i386 target...
*/
Expand Down Expand Up @@ -73,3 +76,5 @@ struct target_revectored_struct {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 0x2000
#define TARGET_MLOCKALL_MCL_FUTURE 0x4000

#endif /* TARGET_SYSCALL_H */
2 changes: 1 addition & 1 deletion linux-user/qemu.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include "exec/user/thunk.h"
#include "syscall_defs.h"
#include "syscall.h"
#include "target_syscall.h"
#include "exec/gdbstub.h"
#include "qemu/queue.h"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

/* this typedef defines how a Program Status Word looks like */
typedef struct {
abi_ulong mask;
Expand Down Expand Up @@ -27,3 +30,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
5 changes: 5 additions & 0 deletions linux-user/sh4/syscall.h → linux-user/sh4/target_syscall.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

struct target_pt_regs {
unsigned long regs[16];
unsigned long pc;
Expand All @@ -15,3 +18,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

struct target_pt_regs {
abi_ulong psr;
abi_ulong pc;
Expand All @@ -18,3 +21,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 4096
#define TARGET_MLOCKALL_MCL_CURRENT 0x2000
#define TARGET_MLOCKALL_MCL_FUTURE 0x4000

#endif /* TARGET_SYSCALL_H */
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

struct target_pt_regs {
abi_ulong u_regs[16];
abi_ulong tstate;
Expand All @@ -19,3 +22,5 @@ struct target_pt_regs {
#define TARGET_MINSIGSTKSZ 4096
#define TARGET_MLOCKALL_MCL_CURRENT 0x2000
#define TARGET_MLOCKALL_MCL_FUTURE 0x4000

#endif /* TARGET_SYSCALL_H */
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#ifndef TARGET_SYSCALL_H
#define TARGET_SYSCALL_H

#define __USER_CS (0x33)
#define __USER_DS (0x2B)

Expand Down Expand Up @@ -100,3 +103,5 @@ struct target_msqid64_ds {
#define TARGET_MINSIGSTKSZ 2048
#define TARGET_MLOCKALL_MCL_CURRENT 1
#define TARGET_MLOCKALL_MCL_FUTURE 2

#endif /* TARGET_SYSCALL_H */

0 comments on commit 460c579

Please sign in to comment.