Date: Thu, 16 Feb 2023 11:56:37 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-branches@FreeBSD.org Subject: git: e8a65c48fa1a - stable/13 - linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16 Message-ID: <202302161156.31GBubOl056456@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=e8a65c48fa1a8aab8af47bd6144870fc71ae7370 commit e8a65c48fa1a8aab8af47bd6144870fc71ae7370 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-16 11:55:21 +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 (cherry picked from commit e6f7fe74a903b4085d60b0054ff75ee677beaf76) --- 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?202302161156.31GBubOl056456>