1
This commit is contained in:
parent
af7a9093a0
commit
4b4462b833
14
a8/xtimer.cc
14
a8/xtimer.cc
@ -273,22 +273,36 @@ namespace a8
|
|||||||
|
|
||||||
void ClearAttacher(Attacher* attacher)
|
void ClearAttacher(Attacher* attacher)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
while (!list_empty(&attacher->timer_list_)) {
|
||||||
|
xtimer_list* tmp_timer = list_first_entry(&attacher->timer_list_, struct xtimer_list, attach_entry);
|
||||||
|
InternalDelete(tmp_timer, false, true);
|
||||||
|
}
|
||||||
|
#else
|
||||||
struct list_head* pos = nullptr;
|
struct list_head* pos = nullptr;
|
||||||
struct list_head* n = nullptr;
|
struct list_head* n = nullptr;
|
||||||
list_for_each_safe(pos, n, &attacher->timer_list_) {
|
list_for_each_safe(pos, n, &attacher->timer_list_) {
|
||||||
xtimer_list* tmp_timer = list_entry(pos, struct xtimer_list, attach_entry);
|
xtimer_list* tmp_timer = list_entry(pos, struct xtimer_list, attach_entry);
|
||||||
InternalDelete(tmp_timer, false, true);
|
InternalDelete(tmp_timer, false, true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DestoryAttacher(Attacher* attacher)
|
void DestoryAttacher(Attacher* attacher)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
while (!list_empty(&attacher->timer_list_)) {
|
||||||
|
xtimer_list* tmp_timer = list_first_entry(&attacher->timer_list_, struct xtimer_list, attach_entry);
|
||||||
|
InternalDelete(tmp_timer, true, true);
|
||||||
|
}
|
||||||
|
#else
|
||||||
struct list_head* pos = nullptr;
|
struct list_head* pos = nullptr;
|
||||||
struct list_head* n = nullptr;
|
struct list_head* n = nullptr;
|
||||||
list_for_each_safe(pos, n, &attacher->timer_list_) {
|
list_for_each_safe(pos, n, &attacher->timer_list_) {
|
||||||
xtimer_list* tmp_timer = list_entry(pos, struct xtimer_list, attach_entry);
|
xtimer_list* tmp_timer = list_entry(pos, struct xtimer_list, attach_entry);
|
||||||
InternalDelete(tmp_timer, true, true);
|
InternalDelete(tmp_timer, true, true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateTimer()
|
void UpdateTimer()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user