forked from Minki/linux
886adbed7a
This patch makes sure that the lockdep_reset_lock() function gets tested. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sasha Levin <sasha.levin@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Waiman Long <longman@redhat.com> Cc: johannes.berg@intel.com Cc: tj@kernel.org Link: https://lkml.kernel.org/r/20181207011148.251812-8-bvanassche@acm.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
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);
|
|
}
|