equal
deleted
inserted
replaced
50 do{ |
50 do{ |
51 last_occured_alarm = last_alarm_set; |
51 last_occured_alarm = last_alarm_set; |
52 EnterMutex(); |
52 EnterMutex(); |
53 TimeDispatch(); |
53 TimeDispatch(); |
54 LeaveMutex(); |
54 LeaveMutex(); |
55 }while ((ret = rt_task_sleep_until(last_alarm_set)) == 0); |
55 while ((ret = rt_task_sleep_until(last_alarm_set)) == -EINTR); |
56 }while (ret == -EINTR && !stop_timer ); |
56 }while (ret == 0); |
|
57 }while (!stop_timer); |
57 printf("End of TimerLoop, code %d\n",ret); |
58 printf("End of TimerLoop, code %d\n",ret); |
58 } |
59 } |
59 |
60 |
60 void StartTimerLoop(TimerCallback_t init_callback) |
61 void StartTimerLoop(TimerCallback_t init_callback) |
61 { |
62 { |
84 if (ret) { |
85 if (ret) { |
85 printf("Failed to start timerloop_task, code %d\n",errno); |
86 printf("Failed to start timerloop_task, code %d\n",errno); |
86 goto error; |
87 goto error; |
87 } |
88 } |
88 |
89 |
89 |
90 return; |
|
91 |
90 error: |
92 error: |
91 cleanup_all(); |
93 cleanup_all(); |
92 } |
94 } |
93 |
95 |
94 void ReceiveLoop_task_proc(void* arg) |
96 void ReceiveLoop_task_proc(void* arg) |