mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
fixed a small problem in port.c, also added some debug statements.
git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1246 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
c71de4b309
commit
f041569bfe
@ -392,13 +392,19 @@ portBASE_TYPE xPortStartScheduler( void )
|
||||
} else {
|
||||
ResumeThread(psSim->hThread);
|
||||
}
|
||||
//debug_printf("switched context\n");
|
||||
debug_printf("switched context\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Oops, we just suspended the task that we want to resume!
|
||||
//TODO: resolve this before it happens
|
||||
ResumeThread(psSim->hThread);
|
||||
if(psSim->yielded) {
|
||||
psSim->yielded = FALSE;
|
||||
ReleaseSemaphore(psSim->hSemaphore, 1, NULL); // awake next task
|
||||
} else {
|
||||
ResumeThread(psSim->hThread);
|
||||
}
|
||||
debug_printf("didn't switch context\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user