tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[PATCH] PR standards/44921: Add errno consts for robust mutexes
Add the two missing errno.h constants: EOWNERDEAD and ENOTRECOVERABLE.
While technically they're used for robust mutexes which we do not
support at the moment, they are listed in POSIX and used by libc++.
While libc++ can be made to build without it, it just locally redefines
the values then, so we may as well define them globally.
---
sys/compat/linux/common/linux_errno.c | 2 ++
sys/sys/errno.h | 6 +++++-
tests/include/t_errno.c | 1 -
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/sys/compat/linux/common/linux_errno.c b/sys/compat/linux/common/linux_errno.c
index 7ec5ae256c02..530c5e474de2 100644
--- a/sys/compat/linux/common/linux_errno.c
+++ b/sys/compat/linux/common/linux_errno.c
@@ -138,5 +138,7 @@ const int native_to_linux_errno[] = {
LINUX_SCERR_SIGN LINUX_EMULTIHOP,
LINUX_SCERR_SIGN LINUX_ENOLINK,
LINUX_SCERR_SIGN LINUX_EPROTO, /* 96 */
+ LINUX_SCERR_SIGN LINUX_EOWNERDEAD,
+ LINUX_SCERR_SIGN LINUX_ENOTRECOVERABLE,
};
__CTASSERT(__arraycount(native_to_linux_errno) == ELAST + 1);
diff --git a/sys/sys/errno.h b/sys/sys/errno.h
index da3b57c6a874..a34574f23b05 100644
--- a/sys/sys/errno.h
+++ b/sys/sys/errno.h
@@ -172,7 +172,11 @@
#define ENOLINK 95 /* Link has been severed */
#define EPROTO 96 /* Protocol error */
-#define ELAST 96 /* Must equal largest errno */
+/* Robust mutexes */
+#define EOWNERDEAD 97 /* Previous owner died */
+#define ENOTRECOVERABLE 98 /* State not recoverable */
+
+#define ELAST 98 /* Must equal largest errno */
#if defined(_KERNEL) || defined(_KMEMUSER)
/* pseudo-errors returned inside kernel to modify return to process */
diff --git a/tests/include/t_errno.c b/tests/include/t_errno.c
index 763e5697aadf..dafc96967a56 100644
--- a/tests/include/t_errno.c
+++ b/tests/include/t_errno.c
@@ -48,7 +48,6 @@ ATF_TC_BODY(errno_constants, tc)
* The following definitions should be available
* according to IEEE Std 1003.1-2008, issue 7.
*/
- atf_tc_expect_fail("PR standards/44921");
fail = true;
--
2.25.1
Home |
Main Index |
Thread Index |
Old Index