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,14 +392,20 @@ portBASE_TYPE xPortStartScheduler( void )
|
|||||||
} else {
|
} else {
|
||||||
ResumeThread(psSim->hThread);
|
ResumeThread(psSim->hThread);
|
||||||
}
|
}
|
||||||
//debug_printf("switched context\n");
|
debug_printf("switched context\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//Oops, we just suspended the task that we want to resume!
|
//Oops, we just suspended the task that we want to resume!
|
||||||
//TODO: resolve this before it happens
|
//TODO: resolve this before it happens
|
||||||
|
if(psSim->yielded) {
|
||||||
|
psSim->yielded = FALSE;
|
||||||
|
ReleaseSemaphore(psSim->hSemaphore, 1, NULL); // awake next task
|
||||||
|
} else {
|
||||||
ResumeThread(psSim->hThread);
|
ResumeThread(psSim->hThread);
|
||||||
}
|
}
|
||||||
|
debug_printf("didn't switch context\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if((dwGlobalIsr & dwEnabledIsr) & dwPendingIsr)
|
if((dwGlobalIsr & dwEnabledIsr) & dwPendingIsr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user