[ 
https://issues.apache.org/jira/browse/MYNEWT-491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15717039#comment-15717039
 ] 

ASF subversion and git services commented on MYNEWT-491:
--------------------------------------------------------

Commit a3830e2b4b8e17e527b7a2b984bcc98764c59939 in incubator-mynewt-core's 
branch refs/heads/develop from [~ccollins476]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-mynewt-core.git;h=a3830e2 
]

MYNEWT-491 Fix boot loader

The boot loader was always crashing on start up.

The previous commit for this ticket
(259c670486422dd9beb891d403e700af08189eb6) assumed sysinit would always
run.  This assumption is wrong in the case of the boot loader.


> Double calling init functions should be disallowed
> --------------------------------------------------
>
>                 Key: MYNEWT-491
>                 URL: https://issues.apache.org/jira/browse/MYNEWT-491
>             Project: Mynewt
>          Issue Type: Improvement
>          Components: Sysinit
>    Affects Versions: v1_0_0_beta1
>            Reporter: Sterling Hughes
>            Assignee: Christopher Collins
>             Fix For: v1_0_0_rel
>
>
> When "init" functions are specified to sysinit, that should be the only place 
> they are called.  They should not be directly called, or bad things happen.
> There should be a macro SYSINIT_ASSERT_CALLED_ONCE() (name it better), at the 
> beginning of these init functions, that asserts on double init.  It can be 
> hard to debug when this function is called twice, and I think it will be very 
> common for users to not notice the init function exported by the package, and 
> instead call it directly, so we should find helpful ways to inform them (at 
> least when build_profile=debug).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to