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.
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 thevasfrontier
, we can likely use afaa
for the first, and acas
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.