- File:
-
- 1 edited
-
libcfa/src/concurrency/alarm.hfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/alarm.hfa
rc457dc41 r4aeaee5 46 46 47 47 struct alarm_node_t { 48 Duration initial;// time when alarm goes off49 Duration period; // if > 0 => period of alarm48 Time alarm; // time when alarm goes off 49 Duration period; // if > 0 => period of alarm 50 50 51 inline dlink(alarm_node_t);51 DLISTED_MGD_IMPL_IN(alarm_node_t) 52 52 53 53 union { 54 $thread * thrd; // thrd who created event55 processor * proc; // proc who created event56 Alarm_Callback callback; // callback to handle event54 $thread * thrd; // thrd who created event 55 processor * proc; // proc who created event 56 Alarm_Callback callback; // callback to handle event 57 57 }; 58 58 59 Time timeval; // actual time at which the alarm goes off 60 enum alarm_type type; // true if this is not a user defined alarm 61 bool set :1; // whether or not the alarm has be registered 59 bool set :1; // whether or not the alarm has be registered 60 enum alarm_type type; // true if this is not a user defined alarm 62 61 }; 63 P9_EMBEDDED( alarm_node_t, dlink(alarm_node_t))62 DLISTED_MGD_IMPL_OUT(alarm_node_t) 64 63 65 void ?{}( alarm_node_t & this, $thread * thrd, Durationalarm, Duration period );66 void ?{}( alarm_node_t & this, processor * proc, Durationalarm, Duration period );67 void ?{}( alarm_node_t & this, Alarm_Callback callback, Durationalarm, Duration period );64 void ?{}( alarm_node_t & this, $thread * thrd, Time alarm, Duration period ); 65 void ?{}( alarm_node_t & this, processor * proc, Time alarm, Duration period ); 66 void ?{}( alarm_node_t & this, Alarm_Callback callback, Time alarm, Duration period ); 68 67 void ^?{}( alarm_node_t & this ); 69 68 70 typedef dlist(alarm_node_t ) alarm_list_t;69 typedef dlist(alarm_node_t, alarm_node_t) alarm_list_t; 71 70 72 71 void insert( alarm_list_t * this, alarm_node_t * n );
Note:
See TracChangeset
for help on using the changeset viewer.