pw_sync: use timeout & deadline over {until,for}_at_least
The signatures, comments, and docs are updated to reflect the most
recent terminology for describing blocking APIs with timeouts and
deadlines.
Change-Id: Iea7ea5490c44c9ce698a694e532345909bba562f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/60040
Reviewed-by: Keir Mierle <keir@google.com>
Pigweed-Auto-Submit: Ewout van Bekkum <ewout@google.com>
Commit-Queue: Ewout van Bekkum <ewout@google.com>
diff --git a/pw_sync/binary_semaphore.cc b/pw_sync/binary_semaphore.cc
index 5500964..37786fc 100644
--- a/pw_sync/binary_semaphore.cc
+++ b/pw_sync/binary_semaphore.cc
@@ -33,15 +33,15 @@
extern "C" bool pw_sync_BinarySemaphore_TryAcquireFor(
pw_sync_BinarySemaphore* semaphore,
- pw_chrono_SystemClock_Duration for_at_least) {
- return semaphore->try_acquire_for(SystemClock::duration(for_at_least.ticks));
+ pw_chrono_SystemClock_Duration timeout) {
+ return semaphore->try_acquire_for(SystemClock::duration(timeout.ticks));
}
extern "C" bool pw_sync_BinarySemaphore_TryAcquireUntil(
pw_sync_BinarySemaphore* semaphore,
- pw_chrono_SystemClock_TimePoint until_at_least) {
+ pw_chrono_SystemClock_TimePoint deadline) {
return semaphore->try_acquire_until(SystemClock::time_point(
- SystemClock::duration(until_at_least.duration_since_epoch.ticks)));
+ SystemClock::duration(deadline.duration_since_epoch.ticks)));
}
extern "C" ptrdiff_t pw_sync_BinarySemaphore_Max(void) {