Ignore:
Timestamp:
Mar 2, 2021, 1:58:12 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2cd784a
Parents:
6047b00
Message:

Changed io to use ring per kernel threads.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/kernel.hfa

    r6047b00 rdddb3dd0  
    2828}
    2929
    30 //-----------------------------------------------------------------------------
    31 // Underlying Locks
    3230#ifdef __CFA_WITH_VERIFY__
    3331        extern bool __cfaabi_dbg_in_kernel();
    3432#endif
    35 
    36 struct __bin_sem_t {
    37         pthread_mutex_t         lock;
    38         pthread_cond_t          cond;
    39         int                     val;
    40 };
    4133
    4234//-----------------------------------------------------------------------------
     
    5244void  ?{}(io_context_params & this);
    5345
    54 struct io_context {
    55         $io_context * ctx;
    56         cluster * cltr;
    57 };
    58 void  ?{}(io_context & this, struct cluster & cl);
    59 void ^?{}(io_context & this);
    60 
    6146//-----------------------------------------------------------------------------
    6247// Processor
     
    9883
    9984        struct {
    100                 $io_context * volatile ctx;
    101                 volatile bool lock;
     85                $io_context * ctx;
     86                bool pending;
     87                bool dirty;
    10288        } io;
    10389
     
    11096
    11197        // Idle lock (kernel semaphore)
    112         __bin_sem_t idle;
     98        int idle;
    11399
    114100        // Termination synchronisation (user semaphore)
Note: See TracChangeset for help on using the changeset viewer.