diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2005-03-10 14:20:12 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2005-03-10 14:20:12 -0500 |
commit | ad9b28f98eed1f13f0bfb35927e5bd445abcdbbf (patch) | |
tree | 38c8fdf361702da8915d0cceaa65dba83c2adfbc /sim | |
parent | 331460dfe88af6b026c30277d2904cf87ce37743 (diff) | |
download | gem5-ad9b28f98eed1f13f0bfb35927e5bd445abcdbbf.tar.xz |
Removed unecessary constructor call at each return.
arch/alpha/isa_traits.hh:
updated copyright date
--HG--
extra : convert_revision : 30c5fc0eb94138ebd4ee047ebdbff5121f95e5f1
Diffstat (limited to 'sim')
-rw-r--r-- | sim/syscall_emul.cc | 32 | ||||
-rw-r--r-- | sim/syscall_emul.hh | 38 |
2 files changed, 35 insertions, 35 deletions
diff --git a/sim/syscall_emul.cc b/sim/syscall_emul.cc index ae865be86..22d62e4d1 100644 --- a/sim/syscall_emul.cc +++ b/sim/syscall_emul.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2004 The Regents of The University of Michigan + * Copyright (c) 2003-2005 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -79,7 +79,7 @@ ignoreFunc(SyscallDesc *desc, int callnum, Process *process, << ", " << xc->getSyscallArg(1) << ", ...)" << endl; - return SyscallReturn(0); + return 0; } @@ -89,14 +89,14 @@ exitFunc(SyscallDesc *desc, int callnum, Process *process, { new SimExitEvent("syscall caused exit", xc->getSyscallArg(0) & 0xff); - return SyscallReturn(1); + return 1; } SyscallReturn getpagesizeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { - return SyscallReturn(VMPageSize); + return VMPageSize; } @@ -109,7 +109,8 @@ obreakFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { p->brk_point = xc->getSyscallArg(0); } - return SyscallReturn(p->brk_point); + DPRINTF(SyscallVerbose, "Break Point changed to: %#X\n", p->brk_point); + return p->brk_point; } @@ -117,7 +118,7 @@ SyscallReturn closeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { int fd = p->sim_fd(xc->getSyscallArg(0)); - return SyscallReturn(close(fd)); + return close(fd); } @@ -133,7 +134,7 @@ readFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) if (bytes_read != -1) bufArg.copyOut(xc->mem); - return SyscallReturn(bytes_read); + return bytes_read; } SyscallReturn @@ -149,7 +150,7 @@ writeFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) fsync(fd); - return SyscallReturn(bytes_written); + return bytes_written; } @@ -162,8 +163,7 @@ lseekFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) off_t result = lseek(fd, offs, whence); - return (result == (off_t)-1) ? SyscallReturn(-errno) : - SyscallReturn(result); + return (result == (off_t)-1) ? -errno : result; } @@ -171,7 +171,7 @@ SyscallReturn munmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) { // given that we don't really implement mmap, munmap is really easy - return SyscallReturn(0); + return 0; } @@ -187,7 +187,7 @@ gethostnameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) name.copyOut(xc->mem); - return SyscallReturn(0); + return 0; } SyscallReturn @@ -199,7 +199,7 @@ unlinkFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) return (TheISA::IntReg)-EFAULT; int result = unlink(path.c_str()); - return (result == -1) ? SyscallReturn(-errno) : SyscallReturn(result); + return (result == -1) ? -errno : result; } SyscallReturn @@ -208,14 +208,14 @@ renameFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) std::string old_name; if (xc->mem->readString(old_name, xc->getSyscallArg(0)) != No_Fault) - return SyscallReturn(-EFAULT); + return -EFAULT; std::string new_name; if (xc->mem->readString(new_name, xc->getSyscallArg(1)) != No_Fault) - return SyscallReturn(-EFAULT); + return -EFAULT; int64_t result = rename(old_name.c_str(),new_name.c_str()); - return (result == -1) ? SyscallReturn(-errno) : SyscallReturn(result); + return (result == -1) ? -errno : result; } diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh index 5f1b8144e..51a075a28 100644 --- a/sim/syscall_emul.hh +++ b/sim/syscall_emul.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2004 The Regents of The University of Michigan + * Copyright (c) 2003-2005 The Regents of The University of Michigan * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -251,7 +251,7 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *process, if (fd < 0 || process->sim_fd(fd) < 0) { // doesn't map to any simulator fd: not a valid target fd - return SyscallReturn(-EBADF); + return -EBADF; } switch (req) { @@ -263,7 +263,7 @@ ioctlFunc(SyscallDesc *desc, int callnum, Process *process, case OS::TIOCGETC: case OS::TIOCGETS: case OS::TIOCGETA: - return SyscallReturn(-ENOTTY); + return -ENOTTY; default: fatal("Unsupported ioctl call: ioctl(%d, 0x%x, ...) @ 0x%llx\n", fd, req, xc->readPC()); @@ -279,13 +279,13 @@ openFunc(SyscallDesc *desc, int callnum, Process *process, std::string path; if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault) - return SyscallReturn(-EFAULT); + return -EFAULT; if (path == "/dev/sysdev0") { // This is a memory-mapped high-resolution timer device on Alpha. // We don't support it, so just punt. DCOUT(SyscallWarnings) << "Ignoring open(" << path << ", ...)" << std::endl; - return SyscallReturn(-ENOENT); + return -ENOENT; } int tgtFlags = xc->getSyscallArg(1); @@ -311,7 +311,7 @@ openFunc(SyscallDesc *desc, int callnum, Process *process, // open the file int fd = open(path.c_str(), hostFlags, mode); - return (fd == -1) ? SyscallReturn(-errno) : SyscallReturn(process->open_fd(fd)); + return (fd == -1) ? -errno : process->open_fd(fd); } @@ -324,17 +324,17 @@ statFunc(SyscallDesc *desc, int callnum, Process *process, std::string path; if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault) - return SyscallReturn(-EFAULT); + return -EFAULT; struct stat hostBuf; int result = stat(path.c_str(), &hostBuf); if (result < 0) - return SyscallReturn(errno); + return errno; OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf); - return SyscallReturn(0); + return 0; } @@ -347,17 +347,17 @@ lstatFunc(SyscallDesc *desc, int callnum, Process *process, std::string path; if (xc->mem->readString(path, xc->getSyscallArg(0)) != No_Fault) - return SyscallReturn(-EFAULT); + return -EFAULT; struct stat hostBuf; int result = lstat(path.c_str(), &hostBuf); if (result < 0) - return SyscallReturn(-errno); + return -errno; OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf); - return SyscallReturn(0); + return 0; } /// Target fstat() handler. @@ -371,17 +371,17 @@ fstatFunc(SyscallDesc *desc, int callnum, Process *process, // DPRINTFR(SyscallVerbose, "fstat(%d, ...)\n", fd); if (fd < 0) - return SyscallReturn(-EBADF); + return -EBADF; struct stat hostBuf; int result = fstat(fd, &hostBuf); if (result < 0) - return SyscallReturn(-errno); + return -errno; OS::copyOutStatBuf(xc->mem, xc->getSyscallArg(1), &hostBuf); - return SyscallReturn(0); + return 0; } @@ -419,7 +419,7 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc) "This will break if not /dev/zero.", xc->getSyscallArg(4)); } - return SyscallReturn(start); + return start; } /// Target getrlimit() handler. @@ -444,7 +444,7 @@ getrlimitFunc(SyscallDesc *desc, int callnum, Process *process, } rlp.copyOut(xc->mem); - return SyscallReturn(0); + return 0; } /// Target gettimeofday() handler. @@ -460,7 +460,7 @@ gettimeofdayFunc(SyscallDesc *desc, int callnum, Process *process, tp.copyOut(xc->mem); - return SyscallReturn(0); + return 0; } @@ -501,7 +501,7 @@ getrusageFunc(SyscallDesc *desc, int callnum, Process *process, rup.copyOut(xc->mem); - return SyscallReturn(0); + return 0; } #endif // __SIM_SYSCALL_EMUL_HH__ |