We have a proliferation of slightly different busy sleep implementations. The only real difference is how they handled shared and whether they relock on sleep or drop the lock if they don't sleep. The internal sleep function already handles these cases. I am simplify doing the substitution for an API that parses ALLOC flags and returns a bool if the lock was dropped.
This will allow me to introduce other changes to busy handling in a way that is API compatible with most code. Although the consumers have to do a little more work to check for the sleep return it typically integrates well with their existing lock acquire/drop loops. I think overall this is simpler and less code.