diff options
author | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-02-13 22:22:54 +0000 |
---|---|---|
committer | Jean-Sébastien Pédron <dumbbell@FreeBSD.org> | 2023-02-16 11:55:21 +0000 |
commit | e8a65c48fa1a8aab8af47bd6144870fc71ae7370 (patch) | |
tree | 9ce1dc31b4a9b85db6a1491306aedc327d1df6ed | |
parent | 3a8e16e47b41b27c8ccf4a3dc66656d9b19fa764 (diff) |
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)
-rw-r--r-- | sys/compat/linuxkpi/common/include/linux/ww_mutex.h | 5 |
1 files changed, 5 insertions, 0 deletions
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)); } |