All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add Sparse annotations to QRCU lock functions and rcutorture wrappers
@ 2006-12-01  3:13 Josh Triplett
  0 siblings, 0 replies; only message in thread
From: Josh Triplett @ 2006-12-01  3:13 UTC (permalink / raw)
  To: linux-kernel, Andrew Morton, Oleg Nesterov, Paul E. McKenney,
	Alan Stern, Jens Axboe

[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]

Signed-off-by: Josh Triplett <josh@freedesktop.org>
---
 include/linux/srcu.h |    4 ++--
 kernel/rcutorture.c  |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index fcdb749..03a9010 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -64,8 +64,8 @@ struct qrcu_struct {
 };
 
 int init_qrcu_struct(struct qrcu_struct *qp);
-int qrcu_read_lock(struct qrcu_struct *qp);
-void qrcu_read_unlock(struct qrcu_struct *qp, int idx);
+int qrcu_read_lock(struct qrcu_struct *qp) __acquires(qp);
+void qrcu_read_unlock(struct qrcu_struct *qp, int idx) __releases(qp);
 void synchronize_qrcu(struct qrcu_struct *qp);
 
 /**
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index ddafbbf..e1c5c4b 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -482,12 +482,12 @@ static void qrcu_torture_cleanup(void)
 	cleanup_qrcu_struct(&qrcu_ctl);
 }
 
-static int qrcu_torture_read_lock(void)
+static int qrcu_torture_read_lock(void) __acquires(&qrcu_ctl)
 {
 	return qrcu_read_lock(&qrcu_ctl);
 }
 
-static void qrcu_torture_read_unlock(int idx)
+static void qrcu_torture_read_unlock(int idx) __releases(&qrcu_ctl)
 {
 	qrcu_read_unlock(&qrcu_ctl, idx);
 }
-- 
1.4.4.1



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-01  3:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-01  3:13 [PATCH] Add Sparse annotations to QRCU lock functions and rcutorture wrappers Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.