From c8de7654682dd8f5efa920f79d6041f2cac2fbeb Mon Sep 17 00:00:00 2001 From: Lluc Alvarez Date: Fri, 21 Sep 2012 04:51:18 -0400 Subject: SE: Ignore FUTEX_PRIVATE_FLAG of sys_futex This patch ignores the FUTEX_PRIVATE_FLAG of the sys_futex system call in SE mode. With this patch, when sys_futex with the options FUTEX_WAIT_PRIVATE or FUTEX_WAKE_PRIVATE is emulated, the FUTEX_PRIVATE_FLAG is ignored and so their behaviours are the regular FUTEX_WAIT and FUTEX_WAKE. Emulating FUTEX_WAIT_PRIVATE and FUTEX_WAKE_PRIVATE as if they were non-private is safe from a functional point of view. The FUTEX_PRIVATE_FLAG does not change the semantics of the futex, it's just a mechanism to improve performance under certain circunstances that can be ignored in SE mode. --- src/kern/linux/linux.hh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/kern') diff --git a/src/kern/linux/linux.hh b/src/kern/linux/linux.hh index 1d52ff323..1fcd80444 100644 --- a/src/kern/linux/linux.hh +++ b/src/kern/linux/linux.hh @@ -225,6 +225,7 @@ class Linux : public OperatingSystem 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; }; // class Linux -- cgit v1.2.3