Search found 5 matches
- Thu May 29, 2014 12:07 pm
- Forum: Development and Feedback
- Topic: chThdSleepUntil() possible bug
- Replies: 8
- Views: 6296
Re: chThdSleepUntil() possible bug
OK, it is my misunderstanding
. Sorry to bother you!
- Thu May 29, 2014 11:13 am
- Forum: Development and Feedback
- Topic: chThdSleepUntil() possible bug
- Replies: 8
- Views: 6296
chThdSleepUntil() possible bug
I see the systime_t type is unsigned then the condition if((time -= chTimeNow()) > 0) is always true and the time value is very long time(in case time < chTimeNow() ) . I think it may be fixed like this
void chThdSleepUntil(systime_t time) {
systime_t t;
chSysLock();
t=time-chTimeNow();
if ...
void chThdSleepUntil(systime_t time) {
systime_t t;
chSysLock();
t=time-chTimeNow();
if ...
- Mon May 12, 2014 7:09 pm
- Forum: General Support
- Topic: Implement chMsgSend, chMsgWait with timeout
- Replies: 5
- Views: 3579
Re: Implement chMsgSend, chMsgWait with timeout
Thank you for helping me. I will try two mailboxes.
PS: sorry for my poor English, it is not my native language
PS: sorry for my poor English, it is not my native language
- Mon May 12, 2014 4:51 pm
- Forum: General Support
- Topic: Implement chMsgSend, chMsgWait with timeout
- Replies: 5
- Views: 3579
Re: Implement chMsgSend, chMsgWait with timeout
Hi Giovanni
Thanks for the quick reply. I have tried the mailboxes. But in my case, i want to suspend the sending thread (with a timeout) when passing a message and release it when the job's done. Could you please give me some advice for this!
Thanks for the quick reply. I have tried the mailboxes. But in my case, i want to suspend the sending thread (with a timeout) when passing a message and release it when the job's done. Could you please give me some advice for this!
- Mon May 12, 2014 10:57 am
- Forum: General Support
- Topic: Implement chMsgSend, chMsgWait with timeout
- Replies: 5
- Views: 3579
Implement chMsgSend, chMsgWait with timeout
Can ChibiOS support these function in the future? I tried to change "chSchGoSleepS" to "chSchGoSleepTimeoutS", But i don't know how to handle the message queue in timeout case.