summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-03-17 10:22:39 -0700
committerBrandon Potter <brandon.potter@amd.com>2016-03-17 10:22:39 -0700
commitb8688346a51860c7d582cf3fe310895e93a0ab6c (patch)
tree80d22e131e63a687a1b16129ba1e87994f04a0e2
parent75d691060742d59894c147ad1abde4c6c9803346 (diff)
downloadgem5-b8688346a51860c7d582cf3fe310895e93a0ab6c.tar.xz
syscall_emul: rename OpenFlagTransTable struct
The structure definition only had the open system call flag set in mind when it was named, so we rename it here with the intention of using it to define additional tables to translate flags for other system calls in the future.
-rw-r--r--src/arch/alpha/linux/linux.cc2
-rw-r--r--src/arch/alpha/linux/linux.hh2
-rw-r--r--src/arch/alpha/tru64/tru64.cc2
-rw-r--r--src/arch/alpha/tru64/tru64.hh2
-rw-r--r--src/arch/arm/freebsd/freebsd.cc4
-rw-r--r--src/arch/arm/freebsd/freebsd.hh4
-rw-r--r--src/arch/arm/linux/linux.cc4
-rw-r--r--src/arch/arm/linux/linux.hh4
-rw-r--r--src/arch/mips/linux/linux.cc2
-rw-r--r--src/arch/mips/linux/linux.hh2
-rw-r--r--src/arch/power/linux/linux.cc2
-rw-r--r--src/arch/power/linux/linux.hh2
-rw-r--r--src/arch/sparc/linux/linux.cc2
-rw-r--r--src/arch/sparc/linux/linux.hh2
-rw-r--r--src/arch/sparc/solaris/solaris.cc2
-rw-r--r--src/arch/sparc/solaris/solaris.hh2
-rw-r--r--src/arch/x86/linux/linux.cc4
-rw-r--r--src/arch/x86/linux/linux.hh4
-rw-r--r--src/kern/operatingsystem.hh6
19 files changed, 27 insertions, 27 deletions
diff --git a/src/arch/alpha/linux/linux.cc b/src/arch/alpha/linux/linux.cc
index ad8388096..6641b3b60 100644
--- a/src/arch/alpha/linux/linux.cc
+++ b/src/arch/alpha/linux/linux.cc
@@ -33,7 +33,7 @@
#include "arch/alpha/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable AlphaLinux::openFlagTable[] = {
+SyscallFlagTransTable AlphaLinux::openFlagTable[] = {
#ifdef _MSC_VER
{ AlphaLinux::TGT_O_RDONLY, _O_RDONLY },
{ AlphaLinux::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/alpha/linux/linux.hh b/src/arch/alpha/linux/linux.hh
index f019b4f21..37508c65b 100644
--- a/src/arch/alpha/linux/linux.hh
+++ b/src/arch/alpha/linux/linux.hh
@@ -43,7 +43,7 @@ class AlphaLinux : public Linux
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/alpha/tru64/tru64.cc b/src/arch/alpha/tru64/tru64.cc
index c72e975f0..1854a02f1 100644
--- a/src/arch/alpha/tru64/tru64.cc
+++ b/src/arch/alpha/tru64/tru64.cc
@@ -31,7 +31,7 @@
#include "arch/alpha/tru64/tru64.hh"
// open(2) flags translation table
-OpenFlagTransTable AlphaTru64::openFlagTable[] = {
+SyscallFlagTransTable AlphaTru64::openFlagTable[] = {
#ifdef _MSC_VER
{ AlphaTru64::TGT_O_RDONLY, _O_RDONLY },
{ AlphaTru64::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/alpha/tru64/tru64.hh b/src/arch/alpha/tru64/tru64.hh
index 5751da8d4..92d6db842 100644
--- a/src/arch/alpha/tru64/tru64.hh
+++ b/src/arch/alpha/tru64/tru64.hh
@@ -38,7 +38,7 @@ class AlphaTru64 : public Tru64
public:
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/arm/freebsd/freebsd.cc b/src/arch/arm/freebsd/freebsd.cc
index bb8514e96..99cd0322b 100644
--- a/src/arch/arm/freebsd/freebsd.cc
+++ b/src/arch/arm/freebsd/freebsd.cc
@@ -35,7 +35,7 @@
#include <fcntl.h>
// open(2) flags translation table
-OpenFlagTransTable ArmFreebsd32::openFlagTable[] = {
+SyscallFlagTransTable ArmFreebsd32::openFlagTable[] = {
{ ArmFreebsd32::TGT_O_RDONLY, O_RDONLY },
{ ArmFreebsd32::TGT_O_WRONLY, O_WRONLY },
{ ArmFreebsd32::TGT_O_RDWR, O_RDWR },
@@ -58,7 +58,7 @@ const int ArmFreebsd32::NUM_OPEN_FLAGS = sizeof(ArmFreebsd32::openFlagTable) /
sizeof(ArmFreebsd32::openFlagTable[0]);
// open(2) flags translation table
-OpenFlagTransTable ArmFreebsd64::openFlagTable[] = {
+SyscallFlagTransTable ArmFreebsd64::openFlagTable[] = {
{ ArmFreebsd64::TGT_O_RDONLY, O_RDONLY },
{ ArmFreebsd64::TGT_O_WRONLY, O_WRONLY },
{ ArmFreebsd64::TGT_O_RDWR, O_RDWR },
diff --git a/src/arch/arm/freebsd/freebsd.hh b/src/arch/arm/freebsd/freebsd.hh
index b5654185b..7e85659ec 100644
--- a/src/arch/arm/freebsd/freebsd.hh
+++ b/src/arch/arm/freebsd/freebsd.hh
@@ -41,7 +41,7 @@ class ArmFreebsd32 : public FreeBSD
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
@@ -196,7 +196,7 @@ class ArmFreebsd64 : public FreeBSD
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/arm/linux/linux.cc b/src/arch/arm/linux/linux.cc
index 62519d38b..2428c4986 100644
--- a/src/arch/arm/linux/linux.cc
+++ b/src/arch/arm/linux/linux.cc
@@ -46,7 +46,7 @@
#include "arch/arm/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable ArmLinux32::openFlagTable[] = {
+SyscallFlagTransTable ArmLinux32::openFlagTable[] = {
#ifdef _MSC_VER
{ ArmLinux32::TGT_O_RDONLY, _O_RDONLY },
{ ArmLinux32::TGT_O_WRONLY, _O_WRONLY },
@@ -99,7 +99,7 @@ const int ArmLinux32::NUM_OPEN_FLAGS = sizeof(ArmLinux32::openFlagTable) /
sizeof(ArmLinux32::openFlagTable[0]);
// open(2) flags translation table
-OpenFlagTransTable ArmLinux64::openFlagTable[] = {
+SyscallFlagTransTable ArmLinux64::openFlagTable[] = {
#ifdef _MSC_VER
{ ArmLinux64::TGT_O_RDONLY, _O_RDONLY },
{ ArmLinux64::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/arm/linux/linux.hh b/src/arch/arm/linux/linux.hh
index dd2f1675d..68ed6ed77 100644
--- a/src/arch/arm/linux/linux.hh
+++ b/src/arch/arm/linux/linux.hh
@@ -53,7 +53,7 @@ class ArmLinux32 : public Linux
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
@@ -213,7 +213,7 @@ class ArmLinux64 : public Linux
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/mips/linux/linux.cc b/src/arch/mips/linux/linux.cc
index 8c4e3bf8c..ce1d7664a 100644
--- a/src/arch/mips/linux/linux.cc
+++ b/src/arch/mips/linux/linux.cc
@@ -33,7 +33,7 @@
#include "arch/mips/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable MipsLinux::openFlagTable[] = {
+SyscallFlagTransTable MipsLinux::openFlagTable[] = {
#ifdef _MSC_VER
{ MipsLinux::TGT_O_RDONLY, _O_RDONLY },
{ MipsLinux::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/mips/linux/linux.hh b/src/arch/mips/linux/linux.hh
index 38f958c89..50a0362da 100644
--- a/src/arch/mips/linux/linux.hh
+++ b/src/arch/mips/linux/linux.hh
@@ -39,7 +39,7 @@ class MipsLinux : public Linux
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/power/linux/linux.cc b/src/arch/power/linux/linux.cc
index b614c0dcb..963233d83 100644
--- a/src/arch/power/linux/linux.cc
+++ b/src/arch/power/linux/linux.cc
@@ -34,7 +34,7 @@
#include "arch/power/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable PowerLinux::openFlagTable[] = {
+SyscallFlagTransTable PowerLinux::openFlagTable[] = {
#ifdef _MSC_VER
{ PowerLinux::TGT_O_RDONLY, _O_RDONLY },
{ PowerLinux::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/power/linux/linux.hh b/src/arch/power/linux/linux.hh
index effb39277..41b2fb6de 100644
--- a/src/arch/power/linux/linux.hh
+++ b/src/arch/power/linux/linux.hh
@@ -100,7 +100,7 @@ class PowerLinux : public Linux
/// This table maps the target open() flags to the corresponding
/// host open() flags.
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
/// Number of entries in openFlagTable[].
static const int NUM_OPEN_FLAGS;
diff --git a/src/arch/sparc/linux/linux.cc b/src/arch/sparc/linux/linux.cc
index 6f8a05750..f3c9c565c 100644
--- a/src/arch/sparc/linux/linux.cc
+++ b/src/arch/sparc/linux/linux.cc
@@ -33,7 +33,7 @@
#include "arch/sparc/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable SparcLinux::openFlagTable[] = {
+SyscallFlagTransTable SparcLinux::openFlagTable[] = {
#ifdef _MSC_VER
{ SparcLinux::TGT_O_RDONLY, _O_RDONLY },
{ SparcLinux::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/sparc/linux/linux.hh b/src/arch/sparc/linux/linux.hh
index bbedc92b1..b48dc7c6d 100644
--- a/src/arch/sparc/linux/linux.hh
+++ b/src/arch/sparc/linux/linux.hh
@@ -56,7 +56,7 @@ class SparcLinux : public Linux
uint64_t __unused4[2];
} tgt_stat;
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
static const int TGT_O_RDONLY = 0x00000000; //!< O_RDONLY
static const int TGT_O_WRONLY = 0x00000001; //!< O_WRONLY
diff --git a/src/arch/sparc/solaris/solaris.cc b/src/arch/sparc/solaris/solaris.cc
index 5474d8b17..e17de3af0 100644
--- a/src/arch/sparc/solaris/solaris.cc
+++ b/src/arch/sparc/solaris/solaris.cc
@@ -33,7 +33,7 @@
#include "arch/sparc/solaris/solaris.hh"
// open(2) flags translation table
-OpenFlagTransTable SparcSolaris::openFlagTable[] = {
+SyscallFlagTransTable SparcSolaris::openFlagTable[] = {
#ifdef _MSC_VER
{ SparcSolaris::TGT_O_RDONLY, _O_RDONLY },
{ SparcSolaris::TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/sparc/solaris/solaris.hh b/src/arch/sparc/solaris/solaris.hh
index 8222addab..9827b6b50 100644
--- a/src/arch/sparc/solaris/solaris.hh
+++ b/src/arch/sparc/solaris/solaris.hh
@@ -37,7 +37,7 @@ class SparcSolaris : public Solaris
{
public:
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
static const int TGT_O_RDONLY = 0x00000000; //!< O_RDONLY
static const int TGT_O_WRONLY = 0x00000001; //!< O_WRONLY
diff --git a/src/arch/x86/linux/linux.cc b/src/arch/x86/linux/linux.cc
index 590af0e40..1b6268d65 100644
--- a/src/arch/x86/linux/linux.cc
+++ b/src/arch/x86/linux/linux.cc
@@ -42,7 +42,7 @@
#include "arch/x86/linux/linux.hh"
// open(2) flags translation table
-OpenFlagTransTable X86Linux64::openFlagTable[] = {
+SyscallFlagTransTable X86Linux64::openFlagTable[] = {
#ifdef _MSC_VER
{ TGT_O_RDONLY, _O_RDONLY },
{ TGT_O_WRONLY, _O_WRONLY },
@@ -81,7 +81,7 @@ const int X86Linux64::NUM_OPEN_FLAGS =
sizeof(X86Linux64::openFlagTable[0]);
// open(2) flags translation table
-OpenFlagTransTable X86Linux32::openFlagTable[] = {
+SyscallFlagTransTable X86Linux32::openFlagTable[] = {
#ifdef _MSC_VER
{ TGT_O_RDONLY, _O_RDONLY },
{ TGT_O_WRONLY, _O_WRONLY },
diff --git a/src/arch/x86/linux/linux.hh b/src/arch/x86/linux/linux.hh
index b2047f65e..2fd61471e 100644
--- a/src/arch/x86/linux/linux.hh
+++ b/src/arch/x86/linux/linux.hh
@@ -67,7 +67,7 @@ class X86Linux64 : public Linux
int64_t unused0[3];
} tgt_stat64;
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
static const int TGT_O_RDONLY = 00000000; //!< O_RDONLY
static const int TGT_O_WRONLY = 00000001; //!< O_WRONLY
@@ -140,7 +140,7 @@ class X86Linux32 : public Linux
uint64_t st_ino;
} __attribute__((__packed__)) tgt_stat64;
- static OpenFlagTransTable openFlagTable[];
+ static SyscallFlagTransTable openFlagTable[];
static const int TGT_O_RDONLY = 00000000; //!< O_RDONLY
static const int TGT_O_WRONLY = 00000001; //!< O_WRONLY
diff --git a/src/kern/operatingsystem.hh b/src/kern/operatingsystem.hh
index fd5899cf8..f6f035f43 100644
--- a/src/kern/operatingsystem.hh
+++ b/src/kern/operatingsystem.hh
@@ -38,9 +38,9 @@
class LiveProcess;
class ThreadContext;
-/// This struct is used to build an target-OS-dependent table that
-/// maps the target's open() flags to the host open() flags.
-struct OpenFlagTransTable {
+/// This struct is used to build target-OS-dependent tables that
+/// map the target's flags to the host's flags.
+struct SyscallFlagTransTable {
int tgtFlag; //!< Target system flag value.
int hostFlag; //!< Corresponding host system flag value.
};