1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

sixlowpan: switch ltimer to be an xtimer

This commit is contained in:
Cenk Gündoğan 2015-10-28 21:03:09 +01:00
parent 23f8fecc04
commit 023c0984b3
2 changed files with 6 additions and 3 deletions

View File

@ -70,7 +70,8 @@ typedef struct {
uint16_t ltime; /**< the time in minutes until deletion */
BITFIELD(ctxs, GNRC_SIXLOWPAN_CTX_SIZE);/**< contexts associated with BR */
gnrc_sixlowpan_nd_router_prf_t *prfs; /**< prefixes associated with BR */
vtimer_t ltimer; /**< timer for deletion */
xtimer_t ltimer; /**< timer for deletion */
msg_t ltimer_msg; /**< msg_t for gnrc_sixlowpan_nd_router_abr_t::ltimer */
} gnrc_sixlowpan_nd_router_abr_t;
/**

View File

@ -241,8 +241,10 @@ void gnrc_sixlowpan_nd_opt_abr_handle(kernel_pid_t iface, ndp_rtr_adv_t *rtr_adv
t.seconds = abr->ltime * 60;
vtimer_set_msg(&abr->ltimer, t, gnrc_ipv6_pid,
GNRC_SIXLOWPAN_ND_MSG_ABR_TIMEOUT, abr);
xtimer_remove(&abr->ltimer);
abr->ltimer_msg.type = GNRC_SIXLOWPAN_ND_MSG_ABR_TIMEOUT;
abr->ltimer_msg.content.ptr = (char *) abr;
xtimer_set_msg(&abr->ltimer, (uint32_t) timex_uint64(t), &abr->ltimer_msg, gnrc_ipv6_pid);
}
gnrc_pktsnip_t *gnrc_sixlowpan_nd_opt_6ctx_build(uint8_t prefix_len, uint8_t flags, uint16_t ltime,