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 2022/03/07 10:12:01 UTC

[GitHub] [mynewt-newt] andrzej-kaczmarek opened a new pull request #457: Add dependencies for sysinit functions

andrzej-kaczmarek opened a new pull request #457:
URL: https://github.com/apache/mynewt-newt/pull/457


   Currently it's only possible to specify an arbitrary stage number for
   sysinit function. This can be a bit troublesome if we need to assure
   some packages are initialized in specific order since it required to
   adjust stages for all relevant packages. Also some packages have stages
   defined via syscfg (which is horrible) which means they can be changed
   and the whole setup breaks.
   
   This patch allows to order sysinit by dependencies between functions.
   New syntax is allowed in addition to stage number:
   - $after:func_name
   - $before:func_name
   
   The former will ensure that function is called after "func_name", and
   the latter - after "func_name".
   
   Each sysinit function shall specify one stage number or any number of
   dependencies - those cannot be mixed. Some examples of valid sysinit
   definitions:
   
   (1)
   func_1: 100
   
   (2)
   func_1: $before:func_2
   func_2: $after:func_1
   
   (3)
   func_1:
     - $before:func_2
     - $after:func_3
   func_2: $before:func_4,$before:func_5
   
   Note that (2) is ok even though both functions depend on each other,
   since effectively both dependencies are the same.
   
   Multiple dependencies can be specified as a list or as a comma-separated
   string (3).
   
   An error will be raised if circular dependency is found when resolving
   order of functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newt] andrzej-kaczmarek merged pull request #457: Add dependencies for sysinit functions

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek merged pull request #457:
URL: https://github.com/apache/mynewt-newt/pull/457


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [mynewt-newt] andrzej-kaczmarek commented on pull request #457: Add dependencies for sysinit functions

Posted by GitBox <gi...@apache.org>.
andrzej-kaczmarek commented on pull request #457:
URL: https://github.com/apache/mynewt-newt/pull/457#issuecomment-1060437195


   ![sysinit](https://user-images.githubusercontent.com/9692685/157012190-f3532a69-69c8-4062-8ee4-a6671dda06d7.png)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org