[PATCH] Add Sparse annotations to QRCU lock functions and rcutorture wrappers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Josh Triplett <[email protected]>
---
 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: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux