Thread stack size is supposed to be determined by a constant in
consts.h. A lot of the code in the codebase relies on this,
including the code for fetching the a thread's id. However, the
assembly code that was really allocating the stack was using a
hardcoded value.
This mismatch led to invalid thread id's being returned, and
broke increasing stack sizes to avoid stack overflows.
To fix this, I made the assembly dependent on #defines, and made
sure those defines were available for those files. I also fixed
how those defines were structured in the first place.
Code Quality
As part of this pull request, I've considered the following:
Style:
[x] Comments adhere to the Style Guide (SG)
[x] Spacing adhere's to the SG
[x] Naming adhere's to the SG
[x] All other aspects of the SG are adhered to, or exceptions are justified in this pull request
Code Craftsmanship:
[x] I've made an attempt to remove all redundant code
[x] I've considered ways in which my changes might impact existing code, and cleaned it up
[x] I've formatted the code in an effort to make it easier to read (proper error handling, function use, etc...)
[x] I've commented appropriately where code is tricky
[x] I agree that there is no "throw-away" code, and that code in this PR is of high quality
Summary of this PR
Thread stack size is supposed to be determined by a constant in consts.h. A lot of the code in the codebase relies on this, including the code for fetching the a thread's id. However, the assembly code that was really allocating the stack was using a hardcoded value.
This mismatch led to invalid thread id's being returned, and broke increasing stack sizes to avoid stack overflows.
To fix this, I made the assembly dependent on #defines, and made sure those defines were available for those files. I also fixed how those defines were structured in the first place.
Code Quality
As part of this pull request, I've considered the following:
Style:
Code Craftsmanship: