Ignore:
Timestamp:
Nov 2, 2017, 4:38:32 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
513daec
Parents:
8fc45b7
Message:

Changed comments to be above fields, to help source control diff readability

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/monitor

    r8fc45b7 r025278e  
    3939}
    4040
    41 // static inline int ?<?(monitor_desc* lhs, monitor_desc* rhs) {
    42 //      return ((intptr_t)lhs) < ((intptr_t)rhs);
    43 // }
    44 
    4541struct monitor_guard_t {
    4642        monitor_desc ** m;
     
    7470
    7571struct __condition_criterion_t {
    76         bool ready;                                             //Whether or not the criterion is met (True if met)
    77         monitor_desc * target;                          //The monitor this criterion concerns
    78         struct __condition_node_t * owner;              //The parent node to which this criterion belongs
    79         __condition_criterion_t * next;         //Intrusive linked list Next field
     72        // Whether or not the criterion is met (True if met)
     73        bool ready;
     74
     75        // The monitor this criterion concerns
     76        monitor_desc * target;
     77
     78        // The parent node to which this criterion belongs
     79        struct __condition_node_t * owner;
     80
     81        // Intrusive linked list Next field
     82        __condition_criterion_t * next;
     83
    8084};
    8185
    8286struct __condition_node_t {
    83         thread_desc * waiting_thread;                   //Thread that needs to be woken when all criteria are met
    84         __condition_criterion_t * criteria;     //Array of criteria (Criterions are contiguous in memory)
    85         unsigned short count;                           //Number of criterions in the criteria
    86         __condition_node_t * next;                      //Intrusive linked list Next field
    87         uintptr_t user_info;                            //Custom user info accessible before signalling
     87        // Thread that needs to be woken when all criteria are met
     88        thread_desc * waiting_thread;
     89
     90        // Array of criteria (Criterions are contiguous in memory)
     91        __condition_criterion_t * criteria;
     92
     93        // Number of criterions in the criteria
     94        unsigned short count;
     95
     96        // Intrusive linked list Next field
     97        __condition_node_t * next;
     98
     99        // Custom user info accessible before signalling
     100        uintptr_t user_info;
     101
    88102};
    89103
     
    102116
    103117struct condition {
    104         __condition_blocked_queue_t blocked;    //Link list which contains the blocked threads as-well as the information needed to unblock them
    105         monitor_desc ** monitors;                       //Array of monitor pointers (Monitors are NOT contiguous in memory)
    106         unsigned short monitor_count;                   //Number of monitors in the array
     118        // Link list which contains the blocked threads as-well as the information needed to unblock them
     119        __condition_blocked_queue_t blocked;
     120
     121        // Array of monitor pointers (Monitors are NOT contiguous in memory)
     122        monitor_desc ** monitors;
     123
     124        // Number of monitors in the array
     125        unsigned short monitor_count;
     126
    107127};
    108128
Note: See TracChangeset for help on using the changeset viewer.