sim-se: fix futexFunc TGT_FUTEX_WAIT always selects bitset
authorCiro Santilli <ciro.santilli@arm.com>
Mon, 7 Oct 2019 10:47:19 +0000 (11:47 +0100)
committerCiro Santilli <ciro.santilli@arm.com>
Thu, 24 Oct 2019 12:59:42 +0000 (12:59 +0000)
Change-Id: I3e2bd1dd34d7cc00b2685547ab74b56bd8126128
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/21605
Reviewed-by: Brandon Potter <Brandon.Potter@amd.com>
Maintainer: Brandon Potter <Brandon.Potter@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/sim/syscall_emul.hh

index 91ddb2567c416eefc126471a656bf1984f2e8be0..66ca28f823dc0834278155b9ef19b0e7ef94eaad 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2013, 2015 ARM Limited
+ * Copyright (c) 2012-2013, 2015, 2019 ARM Limited
  * Copyright (c) 2015 Advanced Micro Devices, Inc.
  * All rights reserved
  *
@@ -368,7 +368,7 @@ futexFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
         if (val != mem_val)
             return -OS::TGT_EWOULDBLOCK;
 
-        if (OS::TGT_FUTEX_WAIT) {
+        if (OS::TGT_FUTEX_WAIT == op) {
             futex_map.suspend(uaddr, process->tgid(), tc);
         } else {
             futex_map.suspend_bitset(uaddr, process->tgid(), tc, val3);