projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5a52c9b
)
liblockdep: Add pthread_rwlock_t test suite
author
Sasha Levin
<sasha.levin@oracle.com>
Thu, 13 Jun 2013 22:41:21 +0000
(18:41 -0400)
committer
Ingo Molnar
<mingo@kernel.org>
Wed, 27 Nov 2013 10:55:24 +0000
(11:55 +0100)
A simple test to make sure we handle rwlocks correctly.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: torvalds@linux-foundation.org
Link:
http://lkml.kernel.org/r/1371163284-6346-7-git-send-email-sasha.levin@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
tools/lib/lockdep/tests/WW.c
[new file with mode: 0644]
patch
|
blob
diff --git a/tools/lib/lockdep/tests/WW.c
b/tools/lib/lockdep/tests/WW.c
new file mode 100644
(file)
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);
+}