Skip to content

Add RTOS configuration for default stack size #2646

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

matthewelse
Copy link
Contributor

This pull request adds default stack size as a configuration option for the RTOS library. Since this exactly replicates the previous functionality, this pull request does not result in any functional changes.

This is mainly helpful for single-threaded projects, where creating a new thread just to set the stack size is unnecessary.

From what I can tell this is relevant to #2631 and #2635, and is needed in jerryscript-project/jerryscript#1318 to support parsing non-trivial javascript files.

cc: @janjongboom

@sg-
Copy link
Contributor

sg- commented Sep 8, 2016

This is a work around more than a solution. Gonna think more about this.

@matthewelse
Copy link
Contributor Author

@sg- do you not think that this is a reasonable thing that people might (albeit rarely) want to configure?

@bogdanm
Copy link
Contributor

bogdanm commented Sep 8, 2016

@sg- do you not think that this is a reasonable thing that people might (albeit rarely) want to configure?

I find that reasonable. @sg-, what are your concerns related to this?

@janjongboom
Copy link
Contributor

@bogdanm @sg- @matthewelse I also find this very reasonable. I know that with BLE + TLS on nRF51 we actually liked to increase the stack size, but was not possible. And Multitech now had a bigger stack than needed in #2635...

@sg-
Copy link
Contributor

sg- commented Sep 9, 2016

Concerns are that development for multi-threaded systems and single threaded systems are different and passing the stack size with an application doesn't solve any problems, it just masks them. For example: https://github.com/ARMmbed/mbed-os-example-tls/blob/master/tls-client/main.cpp#L270 If this is used once, dynamic allocation would be a better approach. If used a few times or many, this should be statically allocated or belong to the class/translation unit. I'd guess there are a lot of places where the amount of resource to perform a task is hidden in similar ways. I think there is a general 'rules of good practice' that should be drafted and then this wont be an issue. I'd expect until then and for a while these things creep up especially when the previous releases allow failure conditions to go uncaught. The plan of record at the moment is to make things as deterministic and reproducible as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants