linux_futex/
errors.rs

1#[derive(Clone, Copy, PartialEq, Eq, Debug)]
2pub enum WrongValueError {
3	/// The futex value did not match the expected value.
4	WrongValue,
5}
6
7#[derive(Clone, Copy, PartialEq, Eq, Debug)]
8pub enum WaitError {
9	/// The futex value did not match the expected value.
10	WrongValue,
11	/// The operation was interrupted by a signal.
12	Interrupted,
13}
14
15#[derive(Clone, Copy, PartialEq, Eq, Debug)]
16pub enum TimedWaitError {
17	/// The futex value did not match the expected value.
18	WrongValue,
19	/// The operation was interrupted by a signal.
20	Interrupted,
21	/// The timeout expired before the operation completed.
22	TimedOut,
23}
24
25#[derive(Clone, Copy, PartialEq, Eq, Debug)]
26pub enum TryAgainError {
27	/// The futex owner thread is about to exit, or the futex value did not match the expected value.
28	TryAgain,
29}
30
31#[derive(Clone, Copy, PartialEq, Eq, Debug)]
32pub enum TimedLockError {
33	/// The futex owner thread is about to exit, but has not yet handled the internal state cleanup. Try again.
34	TryAgain,
35	/// The timeout expired before the operation completed.
36	TimedOut,
37}
38
39#[derive(Clone, Copy, PartialEq, Eq, Debug)]
40pub enum TimedRequeueError {
41	/// The futex value did not match the expected value.
42	WrongValue,
43	/// The timeout expired before the operation completed.
44	TimedOut,
45}
46
47#[derive(Clone, Copy, PartialEq, Eq, Debug)]
48pub enum RequeuePiError {
49	/// The futex value did not match the expected value, or the thread was woken up without being requeued to the [`PiFutex`][crate::PiFutex] first.
50	TryAgain,
51}
52
53#[derive(Clone, Copy, PartialEq, Eq, Debug)]
54pub enum TimedRequeuePiError {
55	/// The futex value did not match the expected value, or the thread was woken up without being requeued to the [`PiFutex`][crate::PiFutex] first.
56	TryAgain,
57	/// The timeout expired before the operation completed.
58	TimedOut,
59}