Changes between Version 4 and Version 5 of common_utils
- Timestamp:
- Aug 12, 2014, 1:26:22 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
common_utils
v4 v5 1 1 = Kernel Utilities = 2 2 3 The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h util.h] files define useful kernel functions,that are used both by the boot_loader and by the kernel.3 The [source:soft/giet_vm/giet_common/utils.c utils.c] and [source:soft/giet_vm/giet_common/utils.h util.h] files define kernel functions that are used both by the boot_loader and by the kernel. 4 4 They are prefixed by ''_'' to remind that they can only be executed by a processor in kernel mode. 5 5 … … 87 87 If the MMU is not activated, the virtual address is extended using X_IO and Y_IO (defined in the hard-config.h file) to reach the cluster_io. 88 88 89 == __4) SpinLock access functions__ == 90 91 The ''giet_lock_t'' structure is defined in the ''utils.h'' file to have one single lock in a 64 bytes cache line. 92 93 === _get_lock( giet_lock_t lock ) === 94 Takes a lock with a blocking ll/sc atomic access. If the cache coherence is granted by the hardware, 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 97 === _release_lock( giet_lock_t lock ) === 98 Releases (or initializes) a lock. 99 89 100 == __X) Miscelaneous functions__ ==