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

Complete restructuration of kernel locks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/chdev.h

    r485 r564  
    2828#include <hal_kernel_types.h>
    2929#include <xlist.h>
    30 #include <remote_spinlock.h>
     30#include <remote_busylock.h>
    3131#include <dev_iob.h>
    3232#include <dev_ioc.h>
     
    4343 * ALMOS-MKH supports multi-channels peripherals, and defines one separated chdev
    4444 * descriptor for each channel (and for each RX/TX direction for the NIC and TXT devices).
    45  * Each chdev contains a waiting queue, registering the "client threads" requests,
     45 * Each chdev contains a trans-clusters waiting queue, registering the "client threads",
    4646 * and an associated "server thread", handling these requests.
    4747 * These descriptors are physically distributed on all clusters to minimize contention.
     
    116116 * of client threads is associated to each chdev descriptor (not for ICU, PIC, IOB).
    117117 * For each device type ***, the specific extension is defined in the "dev_***.h" file.
     118 *
     119 * NOTE : For most chdevs, the busylock is used to protect the waiting queue changes,
     120 *        when a thread register in this queue, or is removed after service.
     121 *        This busylock is also used to protect direct access to the kernel TXT0 terminal
     122 *        (without using the server thread).
    118123 *****************************************************************************************/
    119124
     
    136141    uint32_t             irq_id;      /*! associated IRQ index in local ICU              */
    137142
    138         remote_spinlock_t    wait_lock;   /*! lock protecting exclusive access to queue      */
    139     xlist_entry_t        wait_root;   /*! root of waiting threads queue                  */
     143        xlist_entry_t        wait_root;   /*! root of client threads waiting queue           */
     144    remote_busylock_t    wait_lock;   /*! lock protecting waiting queue                  */
    140145
    141146    union
Note: See TracChangeset for help on using the changeset viewer.