Closed froj closed 10 years ago
So after reading the various arguments, I think the best option is to delegate the checking of double release to the test code instead of the mock semaphore, at least for now. If we realize that it makes the testing process unpractical or error-prone, we can always react by adding some kind of max_count
functionality back.
So after reading the various arguments, I think the best option is to delegate the checking of max_count to the test code instead of the mock semaphore
Agreed, max_count shouldn't be part of the platform abstraction layer, since I can't imagine any useful and correct case, where a semaphore can be infinitely incremented. There has always to be a further check, if an increment is needed or there is a pairwise take&release, such that the counter simply cannot go wild. The check in the test code is then only to find obvious errors (like a forgotten semaphore_take()).
Pull request #15 solves this issue for now. Closed and locked.
Continue the discussion of issue #3 and find a solution.