[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-dbe941827eab53194eda5cd350a4e1414f192658@git.kernel.org>
Date: Wed, 27 Nov 2013 06:09:19 -0800
From: tip-bot for Sasha Levin <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, sasha.levin@...cle.com,
hpa@...or.com, mingo@...nel.org, peterz@...radead.org,
tglx@...utronix.de
Subject: [tip:core/locking] liblockdep: Add pthread_rwlock_t test suite
Commit-ID: dbe941827eab53194eda5cd350a4e1414f192658
Gitweb: http://git.kernel.org/tip/dbe941827eab53194eda5cd350a4e1414f192658
Author: Sasha Levin <sasha.levin@...cle.com>
AuthorDate: Thu, 13 Jun 2013 18:41:21 -0400
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 27 Nov 2013 11:55:24 +0100
liblockdep: Add pthread_rwlock_t test suite
A simple test to make sure we handle rwlocks correctly.
Signed-off-by: Sasha Levin <sasha.levin@...cle.com>
Signed-off-by: Peter Zijlstra <peterz@...radead.org>
Cc: torvalds@...ux-foundation.org
Link: http://lkml.kernel.org/r/1371163284-6346-7-git-send-email-sasha.levin@oracle.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
tools/lib/lockdep/tests/WW.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/lib/lockdep/tests/WW.c b/tools/lib/lockdep/tests/WW.c
new file mode 100644
index 0000000..d44f77d
--- /dev/null
+++ b/tools/lib/lockdep/tests/WW.c
@@ -0,0 +1,13 @@
+#include <liblockdep/rwlock.h>
+
+void main(void)
+{
+ pthread_rwlock_t a, b;
+
+ pthread_rwlock_init(&a, NULL);
+ pthread_rwlock_init(&b, NULL);
+
+ pthread_rwlock_wrlock(&a);
+ pthread_rwlock_rdlock(&b);
+ pthread_rwlock_wrlock(&a);
+}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists