Details
- Reviewers
markj kevans ngie - Commits
- rGe7015a3834ab: pthread_cond_timedwait.3: document pthread_cond_clockwait(3)
rG6d3db07a2e2f: pthread_cond_timedwait.3: use .Fo/.Fc for long arguments list
rGe1136fbcab18: libthr: implement pthread_cond_clockwait(3)
rG149d3e5fcb76: libthr/thread/thr_cond.c: some style
rG196cc005b197: libthr/thread/thr_umtx.c: style _thr_ucond_wait()
rGf4a05f37936e: _umtx_op.2: document the CVWAIT_UMTX_TIME flag for the UMTX_OP_CV_WAIT_UC…
rGd738f66fab92: umtx_op(2): add the CVWAIT_UMTX_TIME flag for the UMTX_OP_CV_WAIT_UC request
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
The test changes seem very reasonable. Just one style(9) suggestion to make the information easier for humans to find test names.
| contrib/netbsd-tests/lib/libpthread/t_condwait.c | ||
|---|---|---|
| 178–179 ↗ | (On Diff #182720) | (just picking a single instance) |
| contrib/netbsd-tests/lib/libpthread/t_condwait.c | ||
|---|---|---|
| 178–179 ↗ | (On Diff #182720) |
I should have said "test description", not "test name" here. |
| contrib/netbsd-tests/lib/libpthread/t_condwait.c | ||
|---|---|---|
| 97 ↗ | (On Diff #182738) | |
| lib/libsys/_umtx_op.2 | ||
| 803 ↗ | (On Diff #182738) | |
| lib/libthr/thread/thr_cond.c | ||
| 220 ↗ | (On Diff #182738) | Why not initialize utime right before the _thr_ucond_wait() call below? |
| share/man/man3/pthread_cond_timedwait.3 | ||
| 54 ↗ | (On Diff #182738) | ... and .Fn pthread_cond_clockwait functions atomically block... |
| 80 ↗ | (On Diff #182738) | Is this the only difference between pthread_cond_timedwait() and pthread_cond_clockwait()? The man page should say so explicitly. |
| sys/kern/kern_umtx.c | ||
| 4197 | Why permit CVWAIT_UMTX_TIME without a _umtx_time? | |
Handle the review notes.
The biggest change is that CVWAIT_UMTX_TIME without umtx_time causes EINVAL.
Man page updates.
Minor code editing.
| lib/libthr/thread/thr_umtx.c | ||
|---|---|---|
| 272 ↗ | (On Diff #182784) | I do not see much utility in having this common function. There is not much code shared between the two usages, so I would instead split this into _thr_ucond_timedwait() and _thr_ucond_clockwait() or so. |
| lib/libthr/thread/thr_umtx.c | ||
|---|---|---|
| 272 ↗ | (On Diff #182784) | This was how I did used CVWAIT_UMTX_TIME initially. But I disliked the need for ETIMEDOUT logic that was repeated in both functions. IMO this is relatively non-trivial to benefit from avoiding the duplication. |