summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-03-12 16:38:16 -0500
committerSteve Reinhardt <stever@eecs.umich.edu>2006-03-12 16:38:16 -0500
commit2d9c9dba37499d87ee599388aca5502279ce953a (patch)
tree263847b0bc4a20d0b138bcb51066c82f6f58f8bb /sim/syscall_emul.hh
parent159cee171976019badb17336eff5b69df3c89528 (diff)
downloadgem5-2d9c9dba37499d87ee599388aca5502279ce953a.tar.xz
Get rid of "Functional" suffix from (read|write)(Blob|String) functions.
--HG-- extra : convert_revision : 1456308af0fd686dff53ec1baddd7747354e1c0a
Diffstat (limited to 'sim/syscall_emul.hh')
-rw-r--r--sim/syscall_emul.hh28
1 files changed, 15 insertions, 13 deletions
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 60e06b294..667003753 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -109,7 +109,7 @@ class BaseBufferArg {
//
virtual bool copyIn(TranslatingPort *memport)
{
- memport->readBlobFunctional(addr, bufPtr, size);
+ memport->readBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now
}
@@ -118,7 +118,7 @@ class BaseBufferArg {
//
virtual bool copyOut(TranslatingPort *memport)
{
- memport->writeBlobFunctional(addr, bufPtr, size);
+ memport->writeBlob(addr, bufPtr, size);
return true; // no EFAULT detection for now
}
@@ -370,7 +370,7 @@ openFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
if (path == "/dev/sysdev0") {
@@ -417,7 +417,7 @@ chmodFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
uint32_t mode = xc->getSyscallArg(1);
@@ -470,7 +470,7 @@ statFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
struct stat hostBuf;
@@ -522,7 +522,7 @@ lstatFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
struct stat hostBuf;
@@ -544,7 +544,7 @@ lstat64Func(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
#if BSD_HOST
@@ -596,7 +596,7 @@ statfsFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
struct statfs hostBuf;
@@ -646,18 +646,20 @@ writevFunc(SyscallDesc *desc, int callnum, Process *process,
return -EBADF;
}
+ TranslatingPort *p = xc->getMemPort();
uint64_t tiov_base = xc->getSyscallArg(1);
size_t count = xc->getSyscallArg(2);
struct iovec hiov[count];
for (int i = 0; i < count; ++i)
{
typename OS::tgt_iovec tiov;
- xc->getMemPort()->readBlobFunctional(tiov_base + i*sizeof(typename OS::tgt_iovec),(uint8_t*)
- &tiov, sizeof(typename OS::tgt_iovec));
+
+ p->readBlob(tiov_base + i*sizeof(typename OS::tgt_iovec),
+ (uint8_t*)&tiov, sizeof(typename OS::tgt_iovec));
hiov[i].iov_len = gtoh(tiov.iov_len);
hiov[i].iov_base = new char [hiov[i].iov_len];
- xc->getMemPort()->readBlobFunctional(gtoh(tiov.iov_base),
- (uint8_t *)hiov[i].iov_base, hiov[i].iov_len);
+ p->readBlob(gtoh(tiov.iov_base), (uint8_t *)hiov[i].iov_base,
+ hiov[i].iov_len);
}
int result = writev(process->sim_fd(fd), hiov, count);
@@ -770,7 +772,7 @@ utimesFunc(SyscallDesc *desc, int callnum, Process *process,
{
std::string path;
- if (!xc->getMemPort()->tryReadStringFunctional(path, xc->getSyscallArg(0)))
+ if (!xc->getMemPort()->tryReadString(path, xc->getSyscallArg(0)))
return -EFAULT;
TypedBufferArg<typename OS::timeval [2]> tp(xc->getSyscallArg(1));