]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
linuxkpi: Add atomic_dec_and_mutex_lock
authorEmmanuel Vadot <manu@FreeBSD.org>
Sun, 17 May 2020 20:09:11 +0000 (20:09 +0000)
committerEmmanuel Vadot <manu@FreeBSD.org>
Sun, 17 May 2020 20:09:11 +0000 (20:09 +0000)
commit7708d3d765720dc68086cc4e1a642d4a79672a51
tree767842bb39c87f32f6a6a133f402902577648974
parent174fb9dbb16338b37d8d4e817be981135c22920e
linuxkpi: Add atomic_dec_and_mutex_lock

This function decrement the counter and if the result is 0 it acquires
the mutex and returns 1, if not it simply returns 0.
Needed by DRM from Linux v5.3

Sponsored-by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D24847
sys/compat/linuxkpi/common/include/linux/mutex.h