Changeset 6b33e89 for libcfa/src/concurrency/alarm.cfa
- Timestamp:
- Apr 25, 2025, 7:39:09 AM (5 months ago)
- Branches:
- master
- Children:
- 65bd3c2
- Parents:
- b195498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/alarm.cfa
rb195498 r6b33e89 10 10 // Created On : Fri Jun 2 11:31:25 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 17 16:11:35 202013 // Update Count : 7512 // Last Modified On : Thu Apr 24 22:22:25 2025 13 // Update Count : 88 14 14 // 15 15 … … 84 84 85 85 void insert( alarm_list_t * this, alarm_node_t * n ) { 86 alarm_node_t * it = & (*this)`first; 87 while( it && (n->deadline > it->deadline) ) { 88 it = & (*it)`next; 89 } 90 if ( it ) { 91 insert_before( *it, *n ); 92 } else { 93 insert_last(*this, *n); 94 } 95 86 alarm_node_t & it = iter( *this ); 87 while ( advance( it ) && it.deadline <= n->deadline ); 88 insert_before( it, *n ); 96 89 verify( validate( *this ) ); 97 90 } … … 99 92 alarm_node_t * pop( alarm_list_t * this ) { 100 93 verify( validate( *this ) ); 101 alarm_node_t * head = & (*this)`first;94 alarm_node_t * head = &first( *this ); 102 95 if( head ) { 103 96 remove(*head); … … 147 140 park(); 148 141 149 /* paranoid */ verify( ! node.set );150 /* paranoid */ verify( & n ode`next== 0p );151 /* paranoid */ verify( & node`prev== 0p );142 /* paranoid */ verify( ! node.set ); 143 /* paranoid */ verify( & next( node ) == 0p ); 144 /* paranoid */ verify( & prev( node ) == 0p ); 152 145 } 153 146
Note:
See TracChangeset
for help on using the changeset viewer.