Rework bakery lock with WFE/SEV sequence
Current implementation of Bakery Lock does tight-loop waiting upon lock
contention.

This commit reworks the implementation to use WFE instruction for
waiting, and SEV to signal lock availability. It also adds the rationale
for choosing Bakery Locks instead of exclusion primitives, and more
comments for the lock algorithm.

Fixes ARM-software/tf-issue#67

Change-Id: Ie351d3dbb27ec8e64dbc9507c84af07bd385a7df
Co-authored-by: Vikram Kanigiri <vikram.kanigiri@arm.com>
1 parent 9f98aa1 commit 82a0aca05394343407f7f12ff454ac9e8cdfcba6
@Jeenu Viswambharan Jeenu Viswambharan authored on 13 Mar 2014
Dan Handley committed on 20 Mar 2014
Showing 2 changed files
View
include/bakery_lock.h
View
lib/sync/locks/bakery/bakery_lock.c