Changeset 02a43ff for libcfa/src/concurrency/alarm.cfa
- Timestamp:
- May 17, 2021, 9:29:43 PM (3 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c2794b2
- Parents:
- 6312b1c (diff), 1eb222ff (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.cfa
r6312b1c r02a43ff 55 55 this.period = period; 56 56 this.thrd = thrd; 57 this.timeval = __kernel_get_time() + alarm; 57 58 set = false; 58 59 type = User; … … 63 64 this.period = period; 64 65 this.proc = proc; 66 this.timeval = __kernel_get_time() + alarm; 65 67 set = false; 66 68 type = Kernel; 67 69 } 68 70 void ?{}( alarm_node_t & this, Alarm_Callback callback, Duration alarm, Duration period ) with( this ) { 71 this.callback = callback; 69 72 this.initial = alarm; 70 73 this.period = period; 71 this. callback = callback;74 this.timeval = __kernel_get_time() + alarm; 72 75 set = false; 73 76 type = Callback; … … 110 113 lock( event_kernel->lock __cfaabi_dbg_ctx2 ); 111 114 { 112 Time curr = __kernel_get_time();113 this->timeval = curr + this->initial;114 115 115 /* paranoid */ verify( validate( alarms ) ); 116 116 117 Time curr = __kernel_get_time(); 117 118 __cfadbg_print_safe( preemption, " KERNEL: alarm inserting %p (%lu -> %lu).\n", this, curr.tn, this->timeval.tn ); 118 119 insert( &alarms, this ); 119 __kernel_set_timer( this-> initial);120 __kernel_set_timer( this->timeval - curr); 120 121 this->set = true; 121 122 }
Note: See TracChangeset
for help on using the changeset viewer.