You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/05/09 02:29:30 UTC

[GitHub] ccollins476ad opened a new pull request #1075: sys/config: Automatically restore on startup

ccollins476ad opened a new pull request #1075: sys/config: Automatically restore on startup
URL: https://github.com/apache/mynewt-core/pull/1075
 
 
   Before PR: the application needed to manually restore the persisted configuration via a call to `conf_load()`, typically from `main()`.
   
   After PR: `conf_load()` gets called automatically at startup.  It doesn't get called directly from `sysinit()`, as the underlying storage hasn't been configured at that point.  Instead, values are loaded by an event which config init function enqueues to the default event queue.  When `main()` has completed its runtime configuration, including that of the sys/config storage, it processes the default eventq, at which point `conf_load()` gets called.
   
   There is one danger here: some packages may try to use a configuration setting before `conf_load()` has been called.  However, this is not a new issue; high priority tasks, created by `sysinit()`, would already preempt `main()` before `conf_load()` could be called.  To address this problem, I believe we need a separate fix.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services