- File:
- 
      - 1 edited
 
 - 
          
  libcfa/src/concurrency/locks.hfa (modified) (7 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      libcfa/src/concurrency/locks.hfar4aeaee5 r6a8882c 5 5 #include "bits/algorithm.hfa" 6 6 #include "bits/locks.hfa" 7 #include "bits/sequence.hfa"8 7 #include "bits/containers.hfa" 9 8 … … 32 31 forall(dtype L | is_blocking_lock(L)) { 33 32 struct info_thread { 34 inline Seqable;35 33 struct $thread * t; 36 34 uintptr_t info; 35 info_thread(L) * next; 37 36 L * lock; 38 37 bool listed; // true if info_thread is on queue, false otherwise; … … 43 42 void ?{}( info_thread(L) & this, $thread * t, uintptr_t info ); 44 43 void ^?{}( info_thread(L) & this ); 44 45 info_thread(L) *& get_next( info_thread(L) & this ); 45 46 } 46 47 … … 49 50 /////////////////////////////////////////////////////////////////// 50 51 51 // struct lock_thread {52 // struct $thread * t;53 // lock_thread * next;54 // };55 56 // void ?{}( lock_thread & this, struct $thread * thd );57 // void ^?{}( lock_thread & this );58 59 // lock_thread *& get_next( lock_thread & );60 61 52 struct blocking_lock { 62 53 // Spin lock used for mutual exclusion … … 64 55 65 56 // List of blocked threads 66 __queue_t( $thread ) blocked_threads;57 __queue_t( struct $thread ) blocked_threads; 67 58 68 59 // Count of current blocked threads … … 144 135 __spinlock_t lock; 145 136 146 info_thread(L) * last_thread;147 148 137 // List of blocked threads 149 Sequence( info_thread(L) ) blocked_threads;138 __queue_t( info_thread(L) ) blocked_threads; 150 139 151 140 // Count of current blocked threads … … 161 150 condition_variable(L) * cond; 162 151 163 info_thread(L) * i;152 info_thread(L) ** i; 164 153 }; 165 154 166 void ?{}( alarm_node_wrap(L) & this, Time alarm, Duration period, Alarm_Callback callback );155 void ?{}( alarm_node_wrap(L) & this, $thread * thrd, Time alarm, Duration period, Alarm_Callback callback ); 167 156 void ^?{}( alarm_node_wrap(L) & this ); 168 157 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  