mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
binfmt: Don't schedule starthook if there are no constructors.
This commit is contained in:
@@ -276,7 +276,10 @@ int exec_module(FAR const struct binary_s *binp)
|
|||||||
* until the new task has been started.
|
* until the new task has been started.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
task_starthook(tcb, exec_ctors, (FAR void *)binp);
|
if (binp->nctors > 0)
|
||||||
|
{
|
||||||
|
task_starthook(tcb, exec_ctors, (FAR void *)binp);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Get the assigned pid before we start the task */
|
/* Get the assigned pid before we start the task */
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
#include "stm32f4discovery.h"
|
#include "stm32f4discovery.h"
|
||||||
|
|
||||||
/* Conditional logic in stm32f4discover.h will determine if certain features
|
/* Conditional logic in stm32f4discovery.h will determine if certain features
|
||||||
* are supported. Tests for these features need to be made after including
|
* are supported. Tests for these features need to be made after including
|
||||||
* stm32f4discovery.h.
|
* stm32f4discovery.h.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ void task_start(void)
|
|||||||
/* Execute the start hook if one has been registered */
|
/* Execute the start hook if one has been registered */
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_STARTHOOK
|
#ifdef CONFIG_SCHED_STARTHOOK
|
||||||
if (tcb->starthook)
|
if (tcb->starthook != NULL)
|
||||||
{
|
{
|
||||||
tcb->starthook(tcb->starthookarg);
|
tcb->starthook(tcb->starthookarg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user