Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2023 22:06:35 GMT
From:      =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <dumbbell@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e6f7fe74a903 - main - linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16
Message-ID:  <202302142206.31EM6ZLw004145@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by dumbbell (ports committer):

URL: https://cgit.FreeBSD.org/src/commit/?id=e6f7fe74a903b4085d60b0054ff75ee677beaf76

commit e6f7fe74a903b4085d60b0054ff75ee677beaf76
Author:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
AuthorDate: 2023-02-13 22:22:54 +0000
Commit:     Jean-Sébastien Pédron <dumbbell@FreeBSD.org>
CommitDate: 2023-02-14 22:01:07 +0000

    linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16
    
    It gains new `struct ww_acquire_ctx *` argument we don't use currently.
    
    Reviewed by:    manu
    Approved by:    manu
    Differential Revision:  https://reviews.freebsd.org/D38568
---
 sys/compat/linuxkpi/common/include/linux/ww_mutex.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h
index d0dd7cd52601..651b39a45b15 100644
--- a/sys/compat/linuxkpi/common/include/linux/ww_mutex.h
+++ b/sys/compat/linuxkpi/common/include/linux/ww_mutex.h
@@ -72,8 +72,13 @@ struct ww_mutex {
 #define	ww_mutex_lock_slow_interruptible(_m, _x) \
 	ww_mutex_lock_interruptible(_m, _x)
 
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 51600
+static inline int __must_check
+ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ctx __unused)
+#else
 static inline int __must_check
 ww_mutex_trylock(struct ww_mutex *lock)
+#endif
 {
 	return (mutex_trylock(&lock->base));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302142206.31EM6ZLw004145>