Ignore:
Timestamp:
Jan 20, 2017, 4:50:15 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
207c7e1d
Parents:
dcb42b8
Message:

Kernel now uses intrusive lists and blocking locks for ready queue management.
Update the plan for concurrency.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/kernel

    rdcb42b8 rbd98b58  
    2020#include <stdbool.h>
    2121
     22#include "invoke.h"
     23
     24//-----------------------------------------------------------------------------
     25// Cluster
     26struct cluster {
     27        simple_thread_list ready_queue;
     28};
     29
     30void ?{}(cluster * this);
     31void ^?{}(cluster * this);
     32
     33//-----------------------------------------------------------------------------
     34// Processor
    2235struct processor {
    2336        struct processorCtx_t * ctx;
    24         unsigned int thread_index;
    25         unsigned int thread_count;
    26         struct thread_h * threads[10];
     37        cluster * cltr;
     38        coroutine * current_coroutine;
     39        thread_h * current_thread;
    2740        bool terminated;
    2841};
    2942
    30 void ?{}(processor * this);
     43void ?{}(processor * this, cluster * cltr);
    3144void ^?{}(processor * this);
    3245
    33 void scheduler_add( struct thread_h * thrd );
    34 void scheduler_remove( struct thread_h * thrd );
    35 void kernel_run( void );
     46
     47//-----------------------------------------------------------------------------
     48// Locks
     49
     50void ?{}(simple_lock * this);
     51void ^?{}(simple_lock * this);
     52
     53void lock( simple_lock * );
     54void unlock( simple_lock * );
    3655
    3756#endif //KERNEL_H
Note: See TracChangeset for help on using the changeset viewer.