Move pthread::Errno to separate module.
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
// Used design from https://www.remlab.net/op/futex-condvar.shtml
|
||||
|
||||
use crate::{
|
||||
error::Errno,
|
||||
header::{pthread::*, time::timespec},
|
||||
pthread::Errno,
|
||||
};
|
||||
|
||||
use core::sync::atomic::{AtomicU32 as AtomicUint, Ordering};
|
||||
@@ -12,7 +12,7 @@ pub struct Cond {
|
||||
prev: AtomicUint,
|
||||
}
|
||||
|
||||
type Result<T, E = crate::pthread::Errno> = core::result::Result<T, E>;
|
||||
type Result<T, E = Errno> = core::result::Result<T, E>;
|
||||
|
||||
impl Cond {
|
||||
pub fn new() -> Self {
|
||||
|
||||
+1
-1
@@ -19,12 +19,12 @@ pub use self::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
error::Errno,
|
||||
header::{
|
||||
errno::{EAGAIN, ETIMEDOUT},
|
||||
time::timespec,
|
||||
},
|
||||
platform::{types::*, Pal, Sys},
|
||||
pthread::Errno,
|
||||
};
|
||||
use core::{
|
||||
mem::MaybeUninit,
|
||||
|
||||
@@ -4,6 +4,7 @@ use core::{
|
||||
};
|
||||
|
||||
use crate::{
|
||||
error::Errno,
|
||||
header::{errno::*, pthread::*, time::timespec},
|
||||
pthread::*,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user