[PATCH] Add Sparse annotations to QRCU lock functions and rcutorturewrappers
From: Josh Triplett
Date: Thu Nov 30 2006 - 22:14:50 EST
Signed-off-by: Josh Triplett <josh@xxxxxxxxxxxxxxx>
---
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