mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-08 18:43:21 +01:00
Make sure that the lockdep_register_key() and lockdep_unregister_key() code is tested when running the lockdep tests. Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Peter Zijlstra (Intel) <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Johannes Berg <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul E. McKenney <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Waiman Long <[email protected]> Cc: Will Deacon <[email protected]> Cc: [email protected] Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
27 lines
460 B
C
27 lines
460 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <liblockdep/mutex.h>
|
|
#include "common.h"
|
|
|
|
void main(void)
|
|
{
|
|
pthread_mutex_t a, b;
|
|
|
|
pthread_mutex_init(&a, NULL);
|
|
pthread_mutex_init(&b, NULL);
|
|
|
|
LOCK_UNLOCK_2(a, b);
|
|
LOCK_UNLOCK_2(b, a);
|
|
|
|
pthread_mutex_destroy(&b);
|
|
pthread_mutex_destroy(&a);
|
|
|
|
pthread_mutex_init(&a, NULL);
|
|
pthread_mutex_init(&b, NULL);
|
|
|
|
LOCK_UNLOCK_2(a, b);
|
|
LOCK_UNLOCK_2(b, a);
|
|
|
|
pthread_mutex_destroy(&b);
|
|
pthread_mutex_destroy(&a);
|
|
}
|