Ignore:
Timestamp:
Aug 17, 2017, 3:42:16 PM (7 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:
6ac5223
Parents:
f710aca
Message:

First working implementation of external scheduling... Still lots of testing to do

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    rf710aca r97e3296  
    2323
    2424static inline void ?{}(monitor_desc * this) {
     25        (&this->lock){};
    2526        this->owner = NULL;
     27        (&this->entry_queue){};
     28        (&this->signal_stack){};
    2629        this->recursion = 0;
     30        this->acceptables = NULL;
     31        this->acceptable_count = 0;
     32        this->accepted_index = -1;
     33        this->pre_accept = 0;
    2734}
    2835
     
    3845}
    3946
    40 void ?{}( monitor_guard_t * this, monitor_desc ** m, int count );
     47void ?{}( monitor_guard_t * this, monitor_desc ** m, int count, void (*func)() );
    4148void ^?{}( monitor_guard_t * this );
    4249
     
    8996uintptr_t front( condition * this );
    9097
     98//-----------------------------------------------------------------------------
     99// External scheduling
     100
     101typedef void (*void_fptr_t)(void);
     102
    91103struct __acceptable_t {
    92         void (*func)(void);
     104        void_fptr_t func;
    93105        unsigned short count;
    94         monitor_desc * monitors[1];
     106        monitor_desc ** monitors;
     107        bool run_preaccept;
    95108};
    96109
    97 void __accept_internal( unsigned short count, __acceptable_t * acceptables, void (*func)(void) );
     110int __accept_internal( unsigned short count, __acceptable_t * acceptables );
    98111
    99112// Local Variables: //
Note: See TracChangeset for help on using the changeset viewer.