Details
- Reviewers
jhb - Group Reviewers
manpages - Commits
- rS303211: Implement mtx_trylock_spin(9).
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Remove CHECKORDER call.
Change function names in the kassert messages.
Fix UP compilation.
Implementation looks fine. I missed earlier though that mutex.9 should be updated as well.
share/man/man9/mutex.9 | ||
---|---|---|
44 ↗ | (On Diff #18508) | Also mtx_trylock_spin_flags? |
share/man/man9/mutex.9 | ||
---|---|---|
44 ↗ | (On Diff #18508) | MTX_RECURSE is not supported, and MTX_QUIT is useless. I did not mentioned mtx_trylock_spin_flags() because I do not see how it could be useful. Its presence is just an implementation detail (cannot avoid defining it without breaking all ten layers of macros). I will add that if you consider that important. |
share/man/man9/mutex.9 | ||
---|---|---|
44 ↗ | (On Diff #18508) | Ok. The only one I thought could be useful would be MTX_QUIET since it does use LOCK_LOG_TRY. |
Document mtx_trlock_spin_flags.
Mention mtx_trylock* in the description of MTX_RECURSE flag.
share/man/man9/mutex.9 | ||
---|---|---|
468 ↗ | (On Diff #18535) | Perhaps "support recursion; that is, attempting to acquire an already-owned mutex fails." This does seem to be a bit of an odd bit of the API (perhaps its my fault or perhaps we inherited it from BSD/OS?) |
share/man/man9/mutex.9 | ||
---|---|---|
468 ↗ | (On Diff #18535) | It can be changed to support recursion, but all uses of trylock must be audited. I think it is not critical in any way. |