Changes between Version 4 and Version 5 of common_utils


Ignore:
Timestamp:
Aug 12, 2014, 1:26:22 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • common_utils

    v4 v5  
    11= Kernel Utilities =
    22
    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.
     3The [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.
    44They are prefixed by ''_'' to remind that they can only be executed by a processor in kernel mode.
    55
     
    8787If 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.
    8888
     89 == __4) SpinLock access functions__ ==
     90
     91The ''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 ) ===
     94Takes a lock with a blocking ll/sc atomic access. If the cache coherence is granted by the hardware,
     95the 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 ) ===
     98Releases (or initializes) a lock.
     99
    89100 == __X) Miscelaneous functions__ ==