[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-sparse
Subject: [PATCH 08/16] Add test for acquire/release
From: Alexey Zaytsev <alexey.zaytsev () gmail ! com>
Date: 2008-12-18 22:33:11
Message-ID: 20081218223237.23692.62518.stgit () zaytsev ! su
[Download RAW message or body]
From: Johannes Berg <johannes@sipsolutions.net>
Test that giving
__attribute__((context(TEST,1,0)))
__attribute__((context(TEST,0,1)))
instead of
__attribute__((context(TEST,1,1)))
works.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---
validation/context.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/validation/context.c b/validation/context.c
index 0b45ba3..e8bb125 100644
--- a/validation/context.c
+++ b/validation/context.c
@@ -380,6 +380,21 @@ static int warn_conditional(void)
return 0;
}
+static void good_require(void)
+__attribute__((context(TEST,1,0)))
+__attribute__((context(TEST,0,1)))
+{
+ __context__(TEST,-1);
+ __context__(TEST,1);
+}
+
+static void good_require_caller(void)
+{
+ __context__(TEST,1,0);
+ good_require();
+ __context__(TEST,-1,1);
+}
+
/*
* check-name: Check -Wcontext
*
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic