summaryrefslogtreecommitdiff
path: root/src/sim/syscall_emul.hh
diff options
context:
space:
mode:
authorBrandon Potter <Brandon.Potter@amd.com>2017-03-01 13:18:49 -0600
committerBrandon Potter <Brandon.Potter@amd.com>2017-03-09 22:42:45 +0000
commite5fe2b82b7cf8842a5a202da69c003d2a2c6af3f (patch)
tree5fa8722df2f643bb5978108afc3638160218b01a /src/sim/syscall_emul.hh
parent43418e7f81099072fb7d56dae11110ae1d858162 (diff)
downloadgem5-e5fe2b82b7cf8842a5a202da69c003d2a2c6af3f.tar.xz
style: Correct some style issues
This changeset fixes line alignment issues, spacing, spelling, etc. for files that are used during SE Mode. Change-Id: Ie61b8d0eb4ebb5af554d72f1297808027833616e Reviewed-on: https://gem5-review.googlesource.com/2264 Maintainer: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Tony Gutierrez <anthony.gutierrez@amd.com> Reviewed-by: Michael LeBeane <Michael.Lebeane@amd.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-by: Pierre-Yves PĂ©neau <pierre-yves.peneau@lirmm.fr>
Diffstat (limited to 'src/sim/syscall_emul.hh')
-rw-r--r--src/sim/syscall_emul.hh51
1 files changed, 25 insertions, 26 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh
index 8cca6ebcb..099ff58d9 100644
--- a/src/sim/syscall_emul.hh
+++ b/src/sim/syscall_emul.hh
@@ -285,8 +285,8 @@ SyscallReturn accessFunc(SyscallDesc *desc, int num,
int index);
/// Futex system call
-/// Implemented by Daniel Sanchez
-/// Used by printf's in multi-threaded apps
+/// Implemented by Daniel Sanchez
+/// Used by printf's in multi-threaded apps
template <class OS>
SyscallReturn
futexFunc(SyscallDesc *desc, int callnum, Process *process,
@@ -477,7 +477,7 @@ convertStatBuf(target_stat &tgt, host_stat *host, bool fakeTTY = false)
tgt->st_mtimeX = TheISA::htog(tgt->st_mtimeX);
tgt->st_ctimeX = host->st_ctime;
tgt->st_ctimeX = TheISA::htog(tgt->st_ctimeX);
- // Force the block size to be 8k. This helps to ensure buffered io works
+ // Force the block size to be 8KB. This helps to ensure buffered io works
// consistently across different hosts.
tgt->st_blksize = 0x2000;
tgt->st_blksize = TheISA::htog(tgt->st_blksize);
@@ -508,11 +508,11 @@ convertStat64Buf(target_stat &tgt, host_stat64 *host, bool fakeTTY = false)
#endif
}
-//Here are a couple convenience functions
+// Here are a couple of convenience functions
template<class OS>
static void
copyOutStatBuf(SETranslatingPortProxy &mem, Addr addr,
- hst_stat *host, bool fakeTTY = false)
+ hst_stat *host, bool fakeTTY = false)
{
typedef TypedBufferArg<typename OS::tgt_stat> tgt_stat_buf;
tgt_stat_buf tgt(addr);
@@ -523,7 +523,7 @@ copyOutStatBuf(SETranslatingPortProxy &mem, Addr addr,
template<class OS>
static void
copyOutStat64Buf(SETranslatingPortProxy &mem, Addr addr,
- hst_stat64 *host, bool fakeTTY = false)
+ hst_stat64 *host, bool fakeTTY = false)
{
typedef TypedBufferArg<typename OS::tgt_stat64> tgt_stat_buf;
tgt_stat_buf tgt(addr);
@@ -1604,24 +1604,24 @@ getrlimitFunc(SyscallDesc *desc, int callnum, Process *process,
TypedBufferArg<typename OS::rlimit> rlp(process->getSyscallArg(tc, index));
switch (resource) {
- case OS::TGT_RLIMIT_STACK:
- // max stack size in bytes: make up a number (8MB for now)
- rlp->rlim_cur = rlp->rlim_max = 8 * 1024 * 1024;
- rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
- rlp->rlim_max = TheISA::htog(rlp->rlim_max);
- break;
-
- case OS::TGT_RLIMIT_DATA:
- // max data segment size in bytes: make up a number
- rlp->rlim_cur = rlp->rlim_max = 256 * 1024 * 1024;
- rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
- rlp->rlim_max = TheISA::htog(rlp->rlim_max);
- break;
-
- default:
- warn("getrlimit: unimplemented resource %d", resource);
- return -EINVAL;
- break;
+ case OS::TGT_RLIMIT_STACK:
+ // max stack size in bytes: make up a number (8MB for now)
+ rlp->rlim_cur = rlp->rlim_max = 8 * 1024 * 1024;
+ rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
+ rlp->rlim_max = TheISA::htog(rlp->rlim_max);
+ break;
+
+ case OS::TGT_RLIMIT_DATA:
+ // max data segment size in bytes: make up a number
+ rlp->rlim_cur = rlp->rlim_max = 256 * 1024 * 1024;
+ rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
+ rlp->rlim_max = TheISA::htog(rlp->rlim_max);
+ break;
+
+ default:
+ warn("getrlimit: unimplemented resource %d", resource);
+ return -EINVAL;
+ break;
}
rlp.copyOut(tc->getMemProxy());
@@ -1703,8 +1703,7 @@ utimesFunc(SyscallDesc *desc, int callnum, Process *process,
tp.copyIn(tc->getMemProxy());
struct timeval hostTimeval[2];
- for (int i = 0; i < 2; ++i)
- {
+ for (int i = 0; i < 2; ++i) {
hostTimeval[i].tv_sec = TheISA::gtoh((*tp)[i].tv_sec);
hostTimeval[i].tv_usec = TheISA::gtoh((*tp)[i].tv_usec);
}