Changes between Version 6 and Version 7 of common_utils
- Timestamp:
- Aug 12, 2014, 1:43:18 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
common_utils
v6 v7 91 91 The ''giet_lock_t'' structure is defined in the ''utils.h'' file to have one single lock in a 64 bytes cache line. It should be aligned on a cache line boundary. 92 92 93 === _get_lock( giet_lock_t lock ) ===93 === void _get_lock( giet_lock_t lock ) === 94 94 Takes a lock with a blocking ll/sc atomic access. If the cache coherence is granted by the hardware, 95 95 the first read is a standard (cacheable) lw, as the local copy can be polled when the lock is already taken by another task, reducing trafic on the interconnect. When the lock is released by the owner task, the local copy is updated or invalidated by the coherence protocol. If there is no hardware cache coherence a pseudo random delay is introduced between two successive retry. 96 96 97 === _release_lock( giet_lock_t lock ) ===97 === void _release_lock( giet_lock_t lock ) === 98 98 Releases (or initializes) a lock. 99 99