Changes between Version 15 and Version 16 of kernel_locks


Ignore:
Timestamp:
Jul 17, 2015, 11:43:10 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_locks

    v15 v16  
    1919== Atomic access function ==
    2020
    21  === unsigned int '''_atomic_increment'''( unsigned int * shared , unsigned int increment ) ===
    22 This blocking function use a LL/SC to atomically increment a shared variable.
     21 === __unsigned int '''_atomic_increment'''( unsigned int * shared , unsigned int increment )__ ===
     22This blocking function uses LL/SC to atomically increment a shared variable.
    2323 * '''shared''' : pointer on the shared variable
    2424 * '''increment''' : increment value
    2525It returns the value of the shared variable before increment.
    2626
     27 === __void '''_atomic_or'''( unsigned int *shared , unsigned int mask )__ ===
     28This blocking function uses LL/SC to atomically set a bit field in a shared variable.
     29 * '''shared''' : pointer on the shared variable.
     30 * '''mask''' : *ptr <= *ptr | mask
     31
     32 === __void '''_atomic_and'''( unsigned int *shared , unsigned int mask )__ ===
     33This blocking function uses LL/SC to atomically reset a bit field in a shared variable.
     34 * '''shared''' : pointer on the shared variable.
     35 * '''mask''' : *ptr <= *ptr & mask
     36
    2737== Simple lock access functions ==
    2838
    29  === void '''_simple_lock_acquire'''( simple_lock_t * lock ) ===
     39 === __void '''_simple_lock_acquire'''( simple_lock_t * lock )__ ===
    3040This blocking function does not implement any ordered allocation, and is not distributed.
    3141It returns only when the lock as been granted.
    3242
    33  === void '''_simple_lock_release'''( simple_lock_t * lock ) ===
     43 === __void '''_simple_lock_release'''( simple_lock_t * lock )__ ===
    3444This function releases the lock, and can be used for lock initialisation.
    3545It must always be called after a successful _simple_lock_acquire().
     
    3747== Queuing Lock Access functions ==
    3848
    39  === void '''_spin_lock_init'''( spin_lock_t * lock ) ===
     49 === __void '''_spin_lock_init'''( spin_lock_t * lock )__ ===
    4050This function initializes the spin_lock ticket allocator.
    4151
    42  === void '''_spin_lock_acquire'''( spin_lock_t * lock ) ===
     52 === __void '''_spin_lock_acquire'''( spin_lock_t * lock )__ ===
    4353This blocking function uses the atomic_increment() function, to implement a ticket allocator and provide ordered access to the lock. It returns only when the lock as been granted.
    4454
    45  === void '''_spin_lock_release'''( spin_lock_t * lock ) ===
     55 === __void '''_spin_lock_release'''( spin_lock_t * lock )__ ===
    4656This function releases the lock, but cannot be used for lock initialisation. It must always be called after a successful _lock_acquire().
    4757
    4858== Distributed Lock Access functions ==
    4959
    50  === void '''_sbt_lock_init'''( sbt_lock_t*   lock ) ===
     60 === __void '''_sqt_lock_init'''( sqt_lock_t*   lock )__ ===
    5161This function allocates and initialises the SQT nodes, distributed on all clusters. It computes the smallest SQT covering all processors defined in the mapping. This function use the _remote_malloc() function, and the distributed kernel heap segments.
    5262
    53  === void '''_sbt_lock_acquire'''( sbt_lock_t*  lock ) ===
    54 This function tries to acquire the SBT lock: It tries to get each "partial" lock on the path from bottom to top, using an atomic LL/SC, and starting from bottom. It is blocking : it polls each "partial" lock until it can be taken, and returns only  when all "partial" locks, at all levels have been obtained.
     63 === __void '''_sqt_lock_acquire'''( sqt_lock_t*  lock )__ ===
     64This function tries to acquire the SQT lock: It tries to get each "partial" lock on the path from bottom to top, using an atomic LL/SC, and starting from bottom. It is blocking : it polls each "partial" lock until it can be taken, and returns only  when all "partial" locks, at all levels have been obtained.
    5565
    56  === void '''_sbt_lock_release'''( sbt_lock_t*  lock ) ===
    57 This function releases the SBT lock: It reset all "partial" locks on the path from bottom to top, using a normal write, and starting from bottom.
     66 === __void '''_sqt_lock_release'''( sqt_lock_t*  lock )__ ===
     67This function releases the SQT lock: It reset all "partial" locks on the path from bottom to top, using a normal write, and starting from bottom.
    5868
    59