On Fri, Sep 25, 2020 at 05:47:14PM -0600, Shuah Khan wrote:
-- Addressed Kees's comments:
- Non-atomic counters renamed to counter_simple32 and counter_simple64 to clearly indicate size.
- Added warning for counter_simple* usage and it should be used only when there is no need for atomicity.
- Renamed counter_atomic to counter_atomic32 to clearly indicate size.
- Renamed counter_atomic_long to counter_atomic64 and it now uses atomic64_t ops and indicates size.
- Test updated for the API renames.
- Added helper functions for test results printing
- Verified that the test module compiles in kunit env. and test module can be loaded to run the test.
Thanks for all of this!
- Updated Documentation to reflect the intent to make the API restricted so it can never be used to guard object lifetimes and state management. I left _return ops for now, inc_return is necessary for now as per the discussion we had on this topic.
I still *really* do not want dec_return() to exist. That is asking for trouble. I'd prefer inc_return() not exist either, but I can live with it. ;)