opr: Assert opr_cv_timedwait return codes 79/14079/6
authorAndrew Deason <adeason@sinenomine.net>
Fri, 21 Feb 2020 15:49:09 +0000 (10:49 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Thu, 1 Jul 2021 16:54:36 +0000 (12:54 -0400)
commite358807347b9ca2cbdd75bc7b0bdb201395c0d26
treee84b984442490e9f145a106b62a88a396a4a98f8
parentcde2449a94915b8b3613b96314595f98765ee68b
opr: Assert opr_cv_timedwait return codes

Almost all of our opr locking primitives assert that they did not
receive an error from pthreads. opr_cv_timedwait is the exception to
this, since it needs to return two possible codes that aren't
internal failures: 0 and ETIMEDOUT. As a result, most callers assert
that our returned code is one of these two values.

To make opr_cv_timedwait act more like our other locking primitives,
removing the need to add opr_Assert()s everywhere, change
opr_cv_timedwait to check that the returned code is 0 or ETIMEDOUT,
and remove the relevant asserts from its callers.

Change-Id: Ie9a62f2edb23969d66e4ed821af37077bc6400c4
Reviewed-on: https://gerrit.openafs.org/14079
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
src/fsprobe/fsprobe.c
src/opr/opr_lock.h
src/viced/viced.c
src/xstat/xstat_cm.c
src/xstat/xstat_fs.c