- File:
-
- 1 edited
-
libcfa/src/concurrency/alarm.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/alarm.hfa
rd3ab183 r58b6d1b 23 23 #include "time.hfa" 24 24 25 #include <containers/list.hfa> 26 27 struct $thread; 25 struct thread_desc; 28 26 struct processor; 29 27 … … 42 40 Time alarm; // time when alarm goes off 43 41 Duration period; // if > 0 => period of alarm 44 45 DLISTED_MGD_IMPL_IN(alarm_node_t) 42 alarm_node_t * next; // intrusive link list field 46 43 47 44 union { 48 $thread* thrd; // thrd who created event45 thread_desc * thrd; // thrd who created event 49 46 processor * proc; // proc who created event 50 47 }; … … 53 50 bool kernel_alarm :1; // true if this is not a user defined alarm 54 51 }; 55 DLISTED_MGD_IMPL_OUT(alarm_node_t)56 52 57 void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period ); 53 typedef alarm_node_t ** __alarm_it_t; 54 55 void ?{}( alarm_node_t & this, thread_desc * thrd, Time alarm, Duration period ); 58 56 void ?{}( alarm_node_t & this, processor * proc, Time alarm, Duration period ); 59 57 void ^?{}( alarm_node_t & this ); 60 58 61 typedef dlist(alarm_node_t, alarm_node_t) alarm_list_t; 59 struct alarm_list_t { 60 alarm_node_t * head; 61 __alarm_it_t tail; 62 }; 63 64 static inline void ?{}( alarm_list_t & this ) with( this ) { 65 head = 0; 66 tail = &head; 67 } 62 68 63 69 void insert( alarm_list_t * this, alarm_node_t * n );
Note:
See TracChangeset
for help on using the changeset viewer.