Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754317Ab3EPDQk (ORCPT ); Wed, 15 May 2013 23:16:40 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:28888 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752514Ab3EPDQg (ORCPT ); Wed, 15 May 2013 23:16:36 -0400 From: Sasha Levin To: torvalds@linux-foundation.org Cc: mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, Sasha Levin Subject: [PATCH v4 6/9] liblockdep: Add pthread_rwlock_t test suite Date: Wed, 15 May 2013 23:15:38 -0400 Message-Id: <1368674141-10796-7-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 1.8.2.1 In-Reply-To: <1368674141-10796-1-git-send-email-sasha.levin@oracle.com> References: <1368674141-10796-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 926 Lines: 35 A simple test to make sure we handle rwlocks correctly. Signed-off-by: Sasha Levin --- tools/lib/lockdep/tests/WW.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tools/lib/lockdep/tests/WW.c 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 + +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); +} -- 1.8.2.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/