mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
Switch to conditional signaling. Seems more robust.
This commit is contained in:
parent
f0e84088c1
commit
1763d0c72c
@ -77,7 +77,7 @@
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
// #define COND_SIGNALING
|
||||
#define COND_SIGNALING
|
||||
// #define CHECK_TASK_RESUMES
|
||||
// #define RUNNING_THREAD_MUTEX
|
||||
#endif
|
||||
@ -358,17 +358,9 @@ portLONG lIndex;
|
||||
/* Start the first task. Will not return unless all threads are killed. */
|
||||
vPortStartFirstTask();
|
||||
|
||||
int i = 0;
|
||||
usleep(1000000);
|
||||
while( pdTRUE != xSchedulerEnd ) {
|
||||
usleep(portTICK_RATE_MICROSECONDS);
|
||||
i++;
|
||||
if(i % 1000 == 0) {
|
||||
printf("."); fflush(stdout);
|
||||
}
|
||||
while(xInterruptsEnabled == pdFALSE){ // Don't call while in interrupt
|
||||
printf("."); fflush(stdout);
|
||||
}
|
||||
vPortSystemTickHandler(SIG_TICK);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user