Home | History | Annotate | Download | only in man9
History log of /src/share/man/man9/condvar.9
RevisionDateAuthorComments
 1.31  07-Sep-2023  ad Permit calling cv_signal()/cv_broadcast() after mutex release.
 1.30  27-Aug-2020  fcambus Fix a bunch of typos in various kernel man pages.
 1.29  19-Aug-2020  msaitoh s/ be be / be /
 1.28  11-May-2020  riastradh Remove timedwaitclock.

This did not fix the bug I hoped it would fix in futex, and needs
more design thought. Might redo it somewhat differently later.
 1.27  03-May-2020  riastradh Bump date.
 1.26  03-May-2020  riastradh Document cv_timedwaitclock.
 1.25  03-May-2020  riastradh Add a note about setting the timeout to zero _and_ returning success.
 1.24  03-May-2020  riastradh Simplify example of cv_timedwaitbt.

It is simpler if there is only one place we check the condition.

That said, there are cases where the caller needs to re-check before
choosing to fail (e.g., futex_wait in kern/sys_futex.c, which must
verify the condition before taking destructive steps to abort the
wait). But it's not clear that that's the norm.
 1.23  03-May-2020  riastradh Update cv_timedwaitbt documentation to reflect useful reality.

Previously, a negative timeout was forbidden (kassert), a zero or
maybe even just a sufficiently small timeout would block forever, and
we would subtract the time elapsed -- possibly longer than the
timeout, leading to a negative updated timeout, which would trip the
kassert the next time around if used as advertised. DERP.

Now negative timeouts are still forbidden in order to detect usage
mistakes, but a zero timeout fails immediately and we clamp the
subtracted time to be at least zero so you can always safely call
cv_timedwaitbt in a loop.

(An alternative would be to fail immediately for all nonpositive
timeouts, and to leave in the timespec the negative time we overshot,
but it's not clear this would be useful.)
 1.22  10-Apr-2020  ad - Make this needed sequence always work for condvars, by not touching the CV
again after wakeup. Previously it could panic because cv_signal() could
be called by cv_wait_sig() + others:

cv_broadcast(cv);
cv_destroy(cv);

- In support of the above, if an LWP doing a timed wait is awoken by
cv_broadcast() or cv_signal(), don't return an error if the timer
fires after the fact, i.e. either succeed or fail, not both.

- Remove LOCKDEBUG code for CVs which never worked properly and is of
questionable use.
 1.21  12-Dec-2019  pgoyette Point out that spurious wake-ups are possible, and that an LWP should
check for resource availability after being awoken.
 1.20  12-Apr-2019  abhinav Split the examples into two separate literal sections

ok wiz@
 1.19  13-Nov-2017  wiz branches: 1.19.4;
Bump date for previous.
 1.18  12-Nov-2017  riastradh Replace xref mb(9) by xref membar_ops(3).
 1.17  12-Nov-2017  riastradh Rework cv_timedwaitbt documentation and example code.
 1.16  03-Jul-2017  wiz Remove workaround for ancient HTML generation code.
 1.15  03-Jul-2017  pgoyette Update to include new cv_timedwaitbt() and cv_timedwaitbt_sig().

Also update code example.

OK riastradh@
 1.14  02-Dec-2010  wiz Remove boilerplate in CODE REFERENCES on file paths.
Describe in intro(9) how to read paths in the CODE REFERENCES section.
 1.13  06-Aug-2008  skrll Spellos
 1.12  04-Jun-2008  ad Note that DIAGNOSTIC/LOCKDEBUG applies.
 1.11  30-Apr-2008  martin branches: 1.11.2;
Convert TNF licenses to new 2 clause variant
 1.10  26-Jan-2008  wiz branches: 1.10.4; 1.10.6;
Document that cv_timedwait with a ticks argument of zero behaves like
cv_wait.
 1.9  29-Mar-2007  ad branches: 1.9.4;
- Note that cv_has_waiters() can only be used to assert that there are
waiters sleeping non-interruptably (i.e., in cv_wait()). Prompted by
a discussion with pooka@.
- Minor cosmetic changes.
 1.8  05-Feb-2007  ad Sync with latest changes.
 1.7  03-Feb-2007  ad Document cv_has_waiters().
 1.6  03-Feb-2007  ad - Require that cv_signal/cv_broadcast be called with the interlock held.
- Provide 'async' versions that don't need the interlock.
 1.5  02-Feb-2007  wiz Sort SEE ALSO. Fix typo.
 1.4  02-Feb-2007  ad Add manpage for memory barrier ops. Not enabled in the Makefile yet.
 1.3  04-Dec-2006  wiz Use more markup. Use HTML escapes. Use .Rs/.Re for book citation.
 1.2  13-Nov-2006  ad Fix errors.
 1.1  13-Nov-2006  ad Add manual pages for RW locks, mutexes and condition variables. Not
enabled in the Makefile.
 1.9.4.1  23-Mar-2008  matt sync with HEAD
 1.10.6.2  17-Jun-2008  yamt sync with head.
 1.10.6.1  18-May-2008  yamt sync with head.
 1.10.4.3  05-Oct-2008  mjf Sync with HEAD.
 1.10.4.2  29-Jun-2008  mjf Sync with HEAD.
 1.10.4.1  02-Jun-2008  mjf Sync with HEAD.
 1.11.2.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.11.2.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.4.3  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.19.4.2  08-Apr-2020  martin Merge changes from current as of 20200406
 1.19.4.1  10-Jun-2019  christos Sync with HEAD

RSS XML Feed