This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RTX51 Tiny problem: os_wait1() return value is 0.

Hi, all, I got a problem about os_wait1() function. When my task 1 used os_wait1(0) to sleep forever, I wish task 1 will wake up by other task using os_set_ready(1). It really does. But sometimes task 1 will wake up without any other task wake up it. So I checked the return value of os_wait1(). If task 1 is wake up by other task, the return value is 0x80 (RDY_EVENT). But if task 1 is wake up by unknown reason, the return value is 0. Any one can help me to fix this problem? or any suggestion?

Thanks a lot.

Best Regards,
Shunekn

Parents
  • Hi, Reinhard Keil, I did also try use os_wait1(K_SIG) and os_wait(K_SIG, 0, 0). But it still sometimes wake up with unknown reason (return value is 0). One thing is interesting, the frequency of wake up by unknown reason are different when I used os_wait1(0) and os_wait1(K_SIG).

    I used os_wait1(0) since the "abnking" example uses the same code.

    BTW, my RTX51 Tiny environment is banking and Round-Robin time sharing.

Reply
  • Hi, Reinhard Keil, I did also try use os_wait1(K_SIG) and os_wait(K_SIG, 0, 0). But it still sometimes wake up with unknown reason (return value is 0). One thing is interesting, the frequency of wake up by unknown reason are different when I used os_wait1(0) and os_wait1(K_SIG).

    I used os_wait1(0) since the "abnking" example uses the same code.

    BTW, my RTX51 Tiny environment is banking and Round-Robin time sharing.

Children
No data