diff options
author | Dan Handley <dan.handley@arm.com> | 2014-04-10 15:37:22 +0100 |
---|---|---|
committer | Dan Handley <dan.handley@arm.com> | 2014-05-06 13:57:48 +0100 |
commit | fb037bfb7cbf7b404c069b4ebac5a10059d948b1 (patch) | |
tree | 7039b044f48574085b3d3c6a2e7c20d41a87da20 /include/lib/bakery_lock.h | |
parent | c5945735a9705675201d2799654348425f28f551 (diff) | |
download | platform_external_arm-trusted-firmware-fb037bfb7cbf7b404c069b4ebac5a10059d948b1.tar.gz platform_external_arm-trusted-firmware-fb037bfb7cbf7b404c069b4ebac5a10059d948b1.tar.bz2 platform_external_arm-trusted-firmware-fb037bfb7cbf7b404c069b4ebac5a10059d948b1.zip |
Always use named structs in header files
Add tag names to all unnamed structs in header files. This
allows forward declaration of structs, which is necessary to
reduce header file nesting (to be implemented in a subsequent
commit).
Also change the typedef names across the codebase to use the _t
suffix to be more conformant with the Linux coding style. The
coding style actually prefers us not to use typedefs at all but
this is considered a step too far for Trusted Firmware.
Also change the IO framework structs defintions to use typedef'd
structs to be consistent with the rest of the codebase.
Change-Id: I722b2c86fc0d92e4da3b15e5cab20373dd26786f
Diffstat (limited to 'include/lib/bakery_lock.h')
-rw-r--r-- | include/lib/bakery_lock.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h index 6e6e96635..0def06748 100644 --- a/include/lib/bakery_lock.h +++ b/include/lib/bakery_lock.h @@ -36,18 +36,18 @@ #define BAKERY_LOCK_MAX_CPUS PLATFORM_CORE_COUNT #ifndef __ASSEMBLY__ -typedef struct { +typedef struct bakery_lock { int owner; volatile char entering[BAKERY_LOCK_MAX_CPUS]; volatile unsigned number[BAKERY_LOCK_MAX_CPUS]; -} bakery_lock; +} bakery_lock_t; #define NO_OWNER (-1) -void bakery_lock_init(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); +void bakery_lock_init(bakery_lock_t *bakery); +void bakery_lock_get(unsigned long mpidr, bakery_lock_t *bakery); +void bakery_lock_release(unsigned long mpidr, bakery_lock_t *bakery); +int bakery_lock_try(unsigned long mpidr, bakery_lock_t *bakery); #endif /*__ASSEMBLY__*/ #endif /* __BAKERY_LOCK_H__ */ |