Changes in src/libcfa/concurrency/monitor [0c78741:5ea06d6]
- File:
-
- 1 edited
-
src/libcfa/concurrency/monitor (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/monitor
r0c78741 r5ea06d6 46 46 //----------------------------------------------------------------------------- 47 47 // Internal scheduling 48 49 struct __condition_criterion_t {50 bool ready; //Whether or not the criterion is met (True if met)51 monitor_desc * target; //The monitor this criterion concerns52 struct __condition_node_t * owner; //The parent node to which this criterion belongs53 __condition_criterion_t * next; //Intrusive linked list Next field54 };55 56 struct __condition_node_t {57 thread_desc * waiting_thread; //Thread that needs to be woken when all criteria are met58 __condition_criterion_t * criteria; //Array of criteria (Criterions are contiguous in memory)59 unsigned short count; //Number of criterions in the criteria60 __condition_node_t * next; //Intrusive linked list Next field61 };62 63 struct __condition_blocked_queue_t {64 __condition_node_t * head;65 __condition_node_t ** tail;66 };67 68 void ?{}( __condition_blocked_queue_t * );69 void append( __condition_blocked_queue_t *, __condition_node_t * );70 __condition_node_t * pop_head( __condition_blocked_queue_t * );71 72 48 struct condition { 73 __ condition_blocked_queue_t blocked; //Link list which contains the blocked threads as-well as the information needed to unblock them74 monitor_desc ** monitors; //Array of monitor pointers (Monitors are NOT contiguous in memory)75 unsigned short monitor_count; //Number of monitors in the array49 __thread_queue_t blocked; 50 monitor_desc ** monitors; 51 unsigned short monitor_count; 76 52 }; 77 53
Note:
See TracChangeset
for help on using the changeset viewer.