Skip to content

Commit

Permalink
[PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture
Browse files Browse the repository at this point in the history
The SRCU wrapper functions srcu_torture_read_lock and
srcu_torture_read_unlock in rcutorture intentionally change the SRCU
context; annotate them accordingly, to avoid a warning.

Signed-off-by: Josh Triplett <josh@freedesktop.org>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
joshtriplett authored and Linus Torvalds committed Dec 7, 2006
1 parent a09c17a commit 012d3ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rcutorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ static void srcu_torture_cleanup(void)
cleanup_srcu_struct(&srcu_ctl);
}

static int srcu_torture_read_lock(void)
static int srcu_torture_read_lock(void) __acquires(&srcu_ctl)
{
return srcu_read_lock(&srcu_ctl);
}
Expand All @@ -419,7 +419,7 @@ static void srcu_read_delay(struct rcu_random_state *rrsp)
schedule_timeout_interruptible(longdelay);
}

static void srcu_torture_read_unlock(int idx)
static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
{
srcu_read_unlock(&srcu_ctl, idx);
}
Expand Down

0 comments on commit 012d3ca

Please sign in to comment.