Ignore:
Timestamp:
Nov 28, 2017, 3:04:37 PM (6 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
4e7a4e6
Parents:
1393df07 (diff), 8a0a64d9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    r1393df07 rd5a52cc  
    3434        this.recursion     = 0;
    3535        this.mask.accepted = NULL;
    36         this.mask.clauses  = NULL;
     36        this.mask.data     = NULL;
    3737        this.mask.size     = 0;
    3838        this.dtor_node     = NULL;
     
    4040
    4141struct monitor_guard_t {
    42         monitor_desc ** m;
    43         __lock_size_t   count;
    44         monitor_desc ** prev_mntrs;
    45         __lock_size_t   prev_count;
    46         fptr_t          prev_func;
     42        monitor_desc **         m;
     43        __lock_size_t           count;
     44        __monitor_group_t prev;
    4745};
    4846
     
    5149
    5250struct monitor_dtor_guard_t {
    53         monitor_desc * m;
    54         monitor_desc ** prev_mntrs;
    55         __lock_size_t   prev_count;
    56         fptr_t          prev_func;
     51        monitor_desc *    m;
     52        __monitor_group_t prev;
    5753};
    5854
     
    8379};
    8480
     81static inline __condition_criterion_t * & get_next( __condition_criterion_t & this ) {
     82        return this.next;
     83}
     84
    8585struct __condition_node_t {
    8686        // Thread that needs to be woken when all criteria are met
     
    100100};
    101101
    102 struct __condition_blocked_queue_t {
    103         __condition_node_t * head;
    104         __condition_node_t ** tail;
    105 };
     102static inline __condition_node_t * & get_next( __condition_node_t & this ) {
     103        return this.next;
     104}
    106105
    107106void ?{}(__condition_node_t & this, thread_desc * waiting_thread, __lock_size_t count, uintptr_t user_info );
     
    109108void ?{}(__condition_criterion_t & this, monitor_desc * target, __condition_node_t * owner );
    110109
    111 void ?{}( __condition_blocked_queue_t & );
    112 void append( __condition_blocked_queue_t &, __condition_node_t * );
    113 __condition_node_t * pop_head( __condition_blocked_queue_t & );
    114 
    115110struct condition {
    116111        // Link list which contains the blocked threads as-well as the information needed to unblock them
    117         __condition_blocked_queue_t blocked;
     112        __queue_t(__condition_node_t) blocked;
    118113
    119114        // Array of monitor pointers (Monitors are NOT contiguous in memory)
Note: See TracChangeset for help on using the changeset viewer.