git: e6f7fe74a903 - main - linuxkpi: Update `ww_mutex_trylock()` API for Linux 5.16
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Feb 2023 22:06:35 UTC
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)); }