This macro will return non-zero if there are threads waiting for this lock; otherwise, it will return zero.
The function assumes (but does not assert) that the caller already holds the lock and that it is interested in other threads waiting for it to release the lock.
The motivation to add this is the implementation of rwsem_is_contended() in linuxkpi.
This Linux function indicates the same thing to the caller: if other threads are waiting for this semaphore.
The amdgpu DRM driver started to use rwsem_is_contended() in Linux 6.12.
This is part of the update of DRM drivers to Linux 6.12.
Sponsored by: The FreeBSD Foundation