Ignore:
Timestamp:
Oct 4, 2018, 11:16:13 PM (6 years ago)
Author:
alain
Message:

Complete restructuration of kernel spinlocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/libk/barrier.h

    r457 r563  
    11/*
    2  * _barrier.h - local kernel barrier definition
     2 * barrier.h - Busy-waiting, local, kernel barrier definition
    33 *
    4  * Author  Alain Greiner (2016)
     4 * Author  Alain Greiner (2016,2017,2018)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    3131 * This structure defines a "rendez-vous" barrier, that can be used
    3232 * to synchronise several kernel threads running in the same  cluster.
    33  * It is used in the kernel_init phase.
     33 * As it is used in the kernel_init phase, it implements a busy-waiting policy.
    3434 * It does not need to be initialised, but it must be statically allocated
    3535 * in the KDATA segment to be properly initialised by the compiler/loader.
     
    4040    uint32_t            current;            // number of arrived threads
    4141    volatile uint32_t   sense;              // barrier state (toggle)
    42     uint32_t            pad[(CONFIG_CACHE_LINE_SIZE>>2)-2];
     42    uint32_t            padding[(CONFIG_CACHE_LINE_SIZE>>2)-2];
    4343}
    4444barrier_t;
     
    4848 * expected threads reach the barrier. It can be used several times without
    4949 * specific initialisation.
    50  * It is portable, as it uses the remote_lw() & remote_sw() access functions.
     50 *****************************************************************************************
    5151 * @ barrier : pointer on barrier
    5252 * @ count   : number of expected thread
Note: See TracChangeset for help on using the changeset viewer.