Contiki的Rtime只支持一个Timer

在现有

http://www.myexception.cn/mobile/1436453.html

关于几个Timer的一个总结

Contiki源代码(Contiki版本3.X)中,在调用rtimer时,需要调用者获取当前的RITMER_NOW,然后在此基础上加上需要的time然后进行定时器调度。但是这样里边,如果存在多个定时任务的时候,如何处理呢?而且如果后一个定时任务的time正好小于前一个,又如何保证后一个被调用呢?在现有的rtimer中,没有看到这样的代码。由这份邮件列表的内容可以看到截止2013年11月16日,Contiki的Rtimer只支持1个Rtimer.

Message: 4
Date: Sat, 16 Nov 2013 17:35:16 +0100 (CET)
From: Beno?t Th?baudeau < benoit.thebaudeau@advansee.com >
Subject: [Contiki-developers] [**SPAM**] Rtimer  limitations
To: Contiki developer mailing list
        < contiki-developers@lists.sourceforge.net >
Message-ID:
        < 1772566825.397867.1384619716871.JavaMail.zimbra@advansee.com >
Content-Type: text/plain; charset=utf-8

Hi all,

Rtimers are very useful in order to schedule hard real-time tasks, while Ctimers
may be delayed. However, looking at their implementation in
core/sys/ rtimer .{ c |h}, it seems that only a single  Rtimer  instance is supported
at once. This is a big issue since it means that only a single  Rtimer  can be
used in the firmware, or that  Rtimer  users have to know each other in order not
to make Rtimers collide. Is it the expected behavior? Moreover, this limitation
is not documented. Any comment?

Best regards,
Beno?t


------------------------------

Message: 5
Date: Sat, 16 Nov 2013 17:41:24 +0100
From: Adam Dunkels < adam@thingsquare.com >
Subject: Re: [Contiki-developers] [**SPAM**] Rtimer  limitations
To: Contiki developer mailing list
        < contiki-developers@lists.sourceforge.net >
Message-ID:
        <CAEW- RJ5WHcsMjoTPXSFNMLhmyboJXV6L63 ctJ5xkCgJ66j= GHw@mail.gmail.com >
Content-Type: text/plain; charset="iso-8859-1"

The  rtimer  API is supposed to support multiple rtimers but, yeah, the
implementation only supports one. Until we've got stable code for multiple
rtimers, this is what we have.

/adam


On Sat, Nov 16, 2013 at 5:35 PM, Beno?t Th?baudeau <
benoit.thebaudeau@advansee.com > wrote:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值