From cf45f22369f85397f113918a4f773b2613f0e19b Mon Sep 17 00:00:00 2001 From: Tuan Ta Date: Mon, 2 Apr 2018 16:21:09 -0400 Subject: 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 Maintainer: Brandon Potter --- src/kern/linux/linux.hh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/kern/linux') 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; -- cgit v1.2.3