summaryrefslogtreecommitdiff
path: root/src/kern
diff options
context:
space:
mode:
authorTuan Ta <qtt2@cornell.edu>2018-04-02 16:21:09 -0400
committerTuan Ta <qtt2@cornell.edu>2019-02-08 15:18:22 +0000
commitcf45f22369f85397f113918a4f773b2613f0e19b (patch)
tree6f5fb74061101f7be22edeaef7d81a95f35f6ae6 /src/kern
parente5415671bd8871b99e754b5db75714a6492c0917 (diff)
downloadgem5-cf45f22369f85397f113918a4f773b2613f0e19b.tar.xz
sim,kern: support FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET ops
This patch adds support for two operations in futex system call: FUTEX_WAIT_BITSET and FUTEX_WAKE_BITSET. The two operations are used to selectively wake up a certain thread waiting on a futex variable. Basically each thread waiting on a futex variable is associated with a bitset that is checked when another thread tries to wake up all threads waiting on the futex variable. Change-Id: I2300e53b144d8fae226423fa2efb0238c1d93ef9 Reviewed-on: https://gem5-review.googlesource.com/c/9621 Reviewed-by: Brandon Potter <Brandon.Potter@amd.com> Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Diffstat (limited to 'src/kern')
-rw-r--r--src/kern/linux/linux.hh13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/kern/linux/linux.hh b/src/kern/linux/linux.hh
index e559e0505..2da596814 100644
--- a/src/kern/linux/linux.hh
+++ b/src/kern/linux/linux.hh
@@ -239,11 +239,14 @@ class Linux : public OperatingSystem
static std::string cpuOnline(Process *process, ThreadContext *tc);
// For futex system call
- static const unsigned TGT_FUTEX_WAIT = 0;
- static const unsigned TGT_FUTEX_WAKE = 1;
- static const unsigned TGT_EAGAIN = 11;
- static const unsigned TGT_EWOULDBLOCK = TGT_EAGAIN;
- static const unsigned TGT_FUTEX_PRIVATE_FLAG = 128;
+ static const unsigned TGT_FUTEX_WAIT = 0;
+ static const unsigned TGT_FUTEX_WAKE = 1;
+ static const unsigned TGT_FUTEX_WAIT_BITSET = 9;
+ static const unsigned TGT_FUTEX_WAKE_BITSET = 10;
+ static const unsigned TGT_EAGAIN = 11;
+ static const unsigned TGT_EWOULDBLOCK = TGT_EAGAIN;
+ static const unsigned TGT_FUTEX_PRIVATE_FLAG = 128;
+ static const unsigned TGT_FUTEX_CLOCK_REALTIME_FLAG = 256;
// for *at syscalls
static const int TGT_AT_FDCWD = -100;