gwsystems / composite

A component-based OS
composite.seas.gwu.edu
185 stars 70 forks source link

Fix hardcoded stack size and alignment #247

Closed Others closed 7 years ago

Others commented 7 years ago

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:

Others commented 7 years ago

I think this is ready for a review @gparmer. Do I need someone else to look through it too?