aboutsummaryrefslogtreecommitdiff
path: root/absl/synchronization/internal/kernel_timeout_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Disable flaky test cases in kernel_timeout_internal_test.Evan Brown2024-06-201-3/+6
| | | | | PiperOrigin-RevId: 645054874 Change-Id: Ic4a820b47edfa71bd3e1f149d54f00ac3c1d16a6
* Remove test references to absl::SharedBitGen, which was never part ofDerek Mauro2024-05-221-1/+1
| | | | | | | | the open source release. This was only used in tests that never ran as part in the open source release. PiperOrigin-RevId: 636167506 Change-Id: Iafc33bd768307fe9ee77b181369635012abf2245
* kernel_timeout_test: Add Apple to the list of slow platforms becauseDerek Mauro2023-08-211-5/+4
| | | | | | | it runs on non-dedicated Kokoro PiperOrigin-RevId: 558874605 Change-Id: Iba35f558ab8c967f98a3176af056e76341fb67c3
* Don't override clock_gettime in the KernelTimeout and WaiterDerek Mauro2023-04-131-5/+8
| | | | | | | tests under sanitizers. The overrides break the sanitizers. PiperOrigin-RevId: 524037272 Change-Id: I85b87d3870c488cb316505e94b394c6f98e9f60f
* Synchronization: Consolidate the logic for whether steady clocks are supportedDerek Mauro2023-04-121-0/+20
| | | | | | | for relative timeouts PiperOrigin-RevId: 523789416 Change-Id: Ide4cfdcae9ea7bffca3355c80ea9c8833a9536e6
* Synchronization: Support true relative timeouts using the POSIXDerek Mauro2023-04-081-0/+52
| | | | | | | | | | | proposed standard pthread_cond_clockwait() and sem_clockwait(). These are currently implemented in glibc >= 2.30. These methods take a clock and use an absolute time with reference to that clock, so KernelTimeout now can produce these values. PiperOrigin-RevId: 522824226 Change-Id: Ife98713f6f95d800b1f8e52d5364a3dbebc4f8a6
* Increase the timeout of Windows for the kernel timeout tests.Tom Rybka2023-03-161-1/+3
| | | | | | | Windows tests often run in Emulation, and even with KVM we can still timeout. PiperOrigin-RevId: 517192968 Change-Id: I3b4e435f8ac8ad1e7eab6f043c051fa75efed64b
* Synchronization: Change KernelTimeout to always store absoluteDerek Mauro2023-03-131-6/+7
| | | | | | | | | | timeouts, but when a relative timeout is provided, the timeout is an absolute timeout against a steady clock (when possible). This allows methods that return relative timeouts to automatically recompute the remaining duration, for instance, on suprious wakeups. PiperOrigin-RevId: 516304139 Change-Id: I7d739cb50dd749eba5dba7ac6c34d18dc53703ed
* Add KernelTimeout methods that convert the timeout to theDerek Mauro2023-02-161-0/+38
| | | | | | | | | | | | | | | std::chrono methods used by std::condition_variable. A followup change will add an implemention of synchronization_internal::Waiter that can use std:mutex/std::condition_variable to implement the per-thread semaphore that absl::Mutex waits on. This implementation may at some point become the default on platforms such as Windows where there doesn't seem to be an easy way of supporting real absolute timeouts. In this case we can defer to their standard library to implement correct support. PiperOrigin-RevId: 510204786 Change-Id: Icf4d695013fd060abbd53dae23e71ea36f731565
* Rewrite KernelTimeout to support both absolute and relative timeoutsDerek Mauro2023-02-091-0/+278
APIs that take KernelTimeout as a parameter can now query if an absolute or relative timeout was requested. If the underlying API can only use one type of timeout, the code will do a reasonable conversion. The goal is to eventually enable the possibility of using wait times that are based on monotonic clocks that are safe against system clock steps. PiperOrigin-RevId: 508541507 Change-Id: Id08bf13515f3e1bfd78d88393cde98a6fd3ef72c