mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
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
This commit is contained in:
parent
7d03acf065
commit
e6f7fe74a9
1 changed files with 5 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue