aboutsummaryrefslogtreecommitdiff
path: root/include/bakery_lock.h
diff options
context:
space:
mode:
authorJon Medhurst <tixy@linaro.org>2014-02-06 14:13:16 +0000
committerDan Handley <dan.handley@arm.com>2014-03-05 16:21:14 +0000
commita4d9f26b009647db14fbf24479245227e712d35d (patch)
tree2f2bfcdc2394046563c86c64de83a2d96132f4a6 /include/bakery_lock.h
parentb2388490302d41038a5dd9a16d7f6d554c828bd3 (diff)
Fix assert in bakery_lock_release()
bakery_lock_release() expects an mpidr as the first argument however bakery_lock_release() is calling it with the 'entry' argument it has calculated. Rather than fixing this to pass the mpidr value it would be much more efficient to just replace the call with assert(bakery->owner == entry) As this leaves no remaining users of bakery_lock_held(), we might as well delete it. Fixes ARM-software/tf-issues#27 Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'include/bakery_lock.h')
-rw-r--r--include/bakery_lock.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/include/bakery_lock.h b/include/bakery_lock.h
index 96153bc..c7ff903 100644
--- a/include/bakery_lock.h
+++ b/include/bakery_lock.h
@@ -45,8 +45,6 @@ typedef struct {
#define NO_OWNER (-1)
void bakery_lock_init(bakery_lock* bakery);
-/* Check whether a lock is held. Mainly used for debug purpose. */
-int bakery_lock_held(unsigned long mpidr, const bakery_lock * bakery);
void bakery_lock_get(unsigned long mpidr, bakery_lock* bakery);
void bakery_lock_release(unsigned long mpidr, bakery_lock* bakery);
int bakery_lock_try(unsigned long mpidr, bakery_lock* bakery);