-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nasa#525, ensure POSIX stack size meets requirements
The pthread_attr_setstacksize() function stipulates that it may fail if the user-supplied stack size is not at least PTHREAD_STACK_MIN and also possibly a multiple of page size. This partially reverts previous PR nasa#508 and adds back rounding up to PTHREAD_STACK_MIN and also adds rounding up to a system page size. However the check for zero stack still remains at the shared level so attempts to create a task with zero stack will still fail. This allows internal helper threads to be created with a default minimum stack size, however.
- Loading branch information
Showing
2 changed files
with
62 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters