aboutsummaryrefslogtreecommitdiff
path: root/include/lock.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-08 12:19:54 +1000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-08 12:36:28 +1000
commite74abeb3c34dcbfcf0d1b3c4462178d9c543c3a9 (patch)
treef1d47261313c381bbba3170b86a17d9fe909073e /include/lock.h
parentbe5a949949cf116025e1c018cd26c4707c669073 (diff)
downloadskiboot-e74abeb3c34dcbfcf0d1b3c4462178d9c543c3a9.zip
skiboot-e74abeb3c34dcbfcf0d1b3c4462178d9c543c3a9.tar.gz
skiboot-e74abeb3c34dcbfcf0d1b3c4462178d9c543c3a9.tar.bz2
lock: Add helper to check if this CPU is already holding a lock
For debug purposes essentially Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/lock.h')
-rw-r--r--include/lock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lock.h b/include/lock.h
index f24e769..823160a 100644
--- a/include/lock.h
+++ b/include/lock.h
@@ -69,6 +69,8 @@ extern bool try_lock(struct lock *l);
extern void lock(struct lock *l);
extern void unlock(struct lock *l);
+extern bool lock_held_by_me(struct lock *l);
+
/* The debug output can happen while the FSP lock, so we need some kind
* of recursive lock support here. I don't want all locks to be recursive
* though, thus the caller need to explicitly call lock_recursive which