[ https://issues.apache.org/jira/browse/MYNEWT-491?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christopher Collins resolved MYNEWT-491. ---------------------------------------- Resolution: Fixed > 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)