Optimize the bakery lock structure for coherent memory
This patch optimizes the data structure used with the bakery lock
implementation for coherent memory to save memory and minimize memory
accesses. These optimizations were already part of the bakery lock
implementation for normal memory and this patch now implements
it for the coherent memory implementation as well. Also
included in the patch is a cleanup to use the do-while loop while
waiting for other contenders to finish choosing their tickets.

Change-Id: Iedb305473133dc8f12126726d8329b67888b70f1
1 parent 3b982be commit 1c9573a157f0d6d76ded5e651bb3f0b9f3a3c9ec
@Soby Mathew Soby Mathew authored on 19 Feb 2015
Showing 3 changed files
View
include/lib/bakery_lock.h
View
lib/locks/bakery/bakery_lock_coherent.c
View
lib/locks/bakery/bakery_lock_normal.c