gwsystems / composite

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

Fix cos_kernel_api races #261

Open gparmer opened 7 years ago

gparmer commented 7 years ago

Any updates to two memory locations in a single cos_kernel_api operation must take great pains to handle races. For example, if we need to increase both the vasrange_frontier and the vasfrontier, we can likely use a faa for the first, and a cas to the second, taking into account concurrent changes. The issue is that another thread might call API functions that can return errors that must also understand this race.

TODO: fix all of these instances.