Changeset 6a490b2 for libcfa/src/concurrency/alarm.hfa
- Timestamp:
- May 11, 2020, 1:53:29 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 504a7dc
- Parents:
- b7d6a36 (diff), a7b486b (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/alarm.hfa
rb7d6a36 r6a490b2 23 23 #include "time.hfa" 24 24 25 struct thread_desc; 25 #include <containers/list.hfa> 26 27 struct $thread; 26 28 struct processor; 27 29 … … 40 42 Time alarm; // time when alarm goes off 41 43 Duration period; // if > 0 => period of alarm 42 alarm_node_t * next; // intrusive link list field 44 45 DLISTED_MGD_IMPL_IN(alarm_node_t) 43 46 44 47 union { 45 thread_desc* thrd; // thrd who created event48 $thread * thrd; // thrd who created event 46 49 processor * proc; // proc who created event 47 50 }; … … 50 53 bool kernel_alarm :1; // true if this is not a user defined alarm 51 54 }; 55 DLISTED_MGD_IMPL_OUT(alarm_node_t) 52 56 53 typedef alarm_node_t ** __alarm_it_t; 54 55 void ?{}( alarm_node_t & this, thread_desc * thrd, Time alarm, Duration period ); 57 void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period ); 56 58 void ?{}( alarm_node_t & this, processor * proc, Time alarm, Duration period ); 57 59 void ^?{}( alarm_node_t & this ); 58 60 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 } 61 typedef dlist(alarm_node_t, alarm_node_t) alarm_list_t; 68 62 69 63 void insert( alarm_list_t * this, alarm_node_t * n );
Note:
See TracChangeset
for help on using the changeset viewer.