^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) #include <liblockdep/mutex.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) void main(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) pthread_mutex_t a, b;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) pthread_mutex_init(&a, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) pthread_mutex_init(&b, NULL);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) pthread_mutex_lock(&a);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) pthread_mutex_lock(&b);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) pthread_mutex_lock(&a);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) }