mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
This patch makes sure that the lockdep_reset_lock() function gets tested. Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Sasha Levin <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Waiman Long <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
21 lines
379 B
C
21 lines
379 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <liblockdep/mutex.h>
|
|
#include "common.h"
|
|
|
|
void main(void)
|
|
{
|
|
pthread_mutex_t a, b, c;
|
|
|
|
pthread_mutex_init(&a, NULL);
|
|
pthread_mutex_init(&b, NULL);
|
|
pthread_mutex_init(&c, NULL);
|
|
|
|
LOCK_UNLOCK_2(a, b);
|
|
LOCK_UNLOCK_2(c, a);
|
|
LOCK_UNLOCK_2(b, c);
|
|
|
|
pthread_mutex_destroy(&c);
|
|
pthread_mutex_destroy(&b);
|
|
pthread_mutex_destroy(&a);
|
|
}
|