• Sandrine Bailleux's avatar
    ARM platforms: Make arm_lock static · 1931d1d7
    Sandrine Bailleux authored
    
    
    The ARM_INSTANTIATE_LOCK macro defines a lock meant to be further
    manipulated using the arm_lock_init/get/release() macros. It has 2
    variants, depending on the BL image it is compiled for. One version
    defines the lock variable with internal linkage whereas the other one,
    with external linkage.
    
    Code that uses these macros is not compliant with MISRA rule 8.4 because
    when using the external linkage version, there is no visible declaration
    for the lock variable.
    
    This patch defines the arm_lock variable with internal linkage in both
    cases. This fits well the way these macros are used in the code today,
    where the lock is not used outside of the translation unit it is
    defined in.
    
    Change-Id: I213a74a2a6088a4f1e9a61a319ca7579c2001320
    Signed-off-by: default avatarSandrine Bailleux <sandrine.bailleux@arm.com>
    1931d1d7
plat_arm.h 9.48 KB