summaryrefslogtreecommitdiff
path: root/src/kern/linux
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2015-04-22 07:51:27 -0700
committerBrandon Potter <brandon.potter@amd.com>2015-04-22 07:51:27 -0700
commit4991c2996516b3226c37cde7ea4b05552e66277a (patch)
tree60fdc46ad2a057da7fd23e8018fc5be81fcee76a /src/kern/linux
parent00e3cab8fc3ffce89c4bbb2e6c4ab3aea873a18d (diff)
downloadgem5-4991c2996516b3226c37cde7ea4b05552e66277a.tar.xz
syscall_emul: implement clock_gettime system call
Diffstat (limited to 'src/kern/linux')
-rw-r--r--src/kern/linux/linux.hh6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kern/linux/linux.hh b/src/kern/linux/linux.hh
index 5e929f1c0..475f9e438 100644
--- a/src/kern/linux/linux.hh
+++ b/src/kern/linux/linux.hh
@@ -130,6 +130,12 @@ class Linux : public OperatingSystem
int64_t tv_usec; //!< microseconds
};
+ /// For clock_gettime().
+ struct timespec {
+ time_t tv_sec; //!< seconds
+ int64_t tv_nsec; //!< nanoseconds
+ };
+
/// Clock ticks per second, for times().
static const int M5_SC_CLK_TCK = 100;