feat(maitake-sync): mutex-traits
integration
#1384
Annotations
3 errors
src/drivers/ps2_keyboard.rs#L20
error[E0277]: `std::cell::UnsafeCell<wait_queue::Node>` cannot be shared between threads safely
--> src/drivers/ps2_keyboard.rs:20:22
|
20 | static PS2_KEYBOARD: Ps2Keyboard = Ps2Keyboard {
| ^^^^^^^^^^^ `std::cell::UnsafeCell<wait_queue::Node>` cannot be shared between threads safely
|
= help: within `wait_queue::Waiter`, the trait `Sync` is not implemented for `std::cell::UnsafeCell<wait_queue::Node>`
note: required because it appears within the type `maitake_sync::loom::inner::cell::UnsafeCell<wait_queue::Node>`
--> /home/runner/work/mycelium/mycelium/maitake-sync/src/loom.rs:311:27
|
311 | pub(crate) struct UnsafeCell<T: ?Sized>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^
note: required because it appears within the type `wait_queue::Waiter`
--> /home/runner/work/mycelium/mycelium/maitake-sync/src/wait_queue.rs:243:8
|
243 | struct Waiter {
| ^^^^^^
= note: required for `List<wait_queue::Waiter>` to implement `Sync`
= note: 1 redundant requirement hidden
= note: required for `mycelium_util::sync::blocking::Mutex<List<wait_queue::Waiter>>` to implement `Sync`
note: required because it appears within the type `WaitQueue`
--> /home/runner/work/mycelium/mycelium/maitake-sync/src/wait_queue.rs:186:12
|
186 | pub struct WaitQueue<Lock: ScopedRawMutex = DefaultMutex> {
| ^^^^^^^^^
note: required because it appears within the type `Ps2Keyboard`
--> src/drivers/ps2_keyboard.rs:6:12
|
6 | pub struct Ps2Keyboard {
| ^^^^^^^^^^^
= note: shared static variables must have a type that implements `Sync`
|
src/rt.rs#L56
error[E0277]: `std::cell::UnsafeCell<mycelium_util::cordyceps::list::Links<maitake::time::timer::sleep::Entry>>` cannot be shared between threads safely
--> src/rt.rs:56:15
|
56 | static TIMER: spin::InitOnce<time::Timer> = spin::InitOnce::uninitialized();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `std::cell::UnsafeCell<mycelium_util::cordyceps::list::Links<maitake::time::timer::sleep::Entry>>` cannot be shared between threads safely
|
= help: within `maitake::time::timer::sleep::Entry`, the trait `Sync` is not implemented for `std::cell::UnsafeCell<mycelium_util::cordyceps::list::Links<maitake::time::timer::sleep::Entry>>`
note: required because it appears within the type `maitake::loom::inner::cell::UnsafeCell<mycelium_util::cordyceps::list::Links<maitake::time::timer::sleep::Entry>>`
--> /home/runner/work/mycelium/mycelium/maitake/src/loom.rs:204:27
|
204 | pub(crate) struct UnsafeCell<T: ?Sized>(core::cell::UnsafeCell<T>);
| ^^^^^^^^^^
note: required because it appears within the type `maitake::time::timer::sleep::Entry`
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer/sleep.rs:39:19
|
39 | pub(super) struct Entry {
| ^^^^^
= note: required for `List<maitake::time::timer::sleep::Entry>` to implement `Sync`
= note: required because it appears within the type `[List<maitake::time::timer::sleep::Entry>; 64]`
note: required because it appears within the type `maitake::time::timer::wheel::Wheel`
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer/wheel.rs:20:8
|
20 | struct Wheel {
| ^^^^^
= note: required because it appears within the type `[maitake::time::timer::wheel::Wheel; 6]`
note: required because it appears within the type `maitake::time::timer::wheel::Core`
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer/wheel.rs:11:28
|
11 | pub(in crate::time) struct Core {
| ^^^^
= note: required for `mycelium_util::sync::blocking::Mutex<maitake::time::timer::wheel::Core>` to implement `Sync`
note: required because it appears within the type `Timer`
--> /home/runner/work/mycelium/mycelium/maitake/src/time/timer.rs:161:12
|
161 | pub struct Timer {
| ^^^^^
= note: required for `InitOnce<Timer>` to implement `Sync`
= note: shared static variables must have a type that implements `Sync`
|
|
This job failed
Loading