| 71 | } |
| 72 | |
| 73 | func (this *timerList) delete_timer(seqID uint32) bool { |
| 74 | curr_head := this.head |
| 75 | var prev_head *xtimer = nil |
| 76 | for curr_head != nil { |
| 77 | if curr_head.seqID != seqID { |
| 78 | prev_head = curr_head |
| 79 | curr_head = curr_head.next |
| 80 | continue |
| 81 | } |
| 82 | |
| 83 | if curr_head.running { |
| 84 | return true |
| 85 | } |
| 86 | |
| 87 | if prev_head == nil { |
| 88 | this.head = curr_head.next |
| 89 | } else { |
| 90 | prev_head.next = curr_head.next |
| 91 | } |
| 92 | |
| 93 | if curr_head.next == nil { |
| 94 | this.tail = prev_head |
| 95 | } |
| 96 | this.pool.Put(curr_head) |
| 97 | return true |
| 98 | } |
| 99 | return false |
| 100 | } |
| 101 | |
| 102 | func (this *timerList) execute(now uint64, count uint32) (uint32, bool) { |
| 103 | var running_timer *xtimer = nil |