We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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
The value 0 for os_wait1 is not specified. Why are you not using a signal.
os_wait1 (K_SIG)
should work.
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.