^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #ifndef _LIBLOCKDEP_TEST_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #define _LIBLOCKDEP_TEST_COMMON_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) #define LOCK_UNLOCK_2(a, b) \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) do { \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) pthread_mutex_lock(&(a)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) pthread_mutex_lock(&(b)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) pthread_mutex_unlock(&(b)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) pthread_mutex_unlock(&(a)); \
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) } while(0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #endif