diff --git a/src/runtime2/component/mod.rs b/src/runtime2/component/mod.rs index 58b0ea3defc4d26d844fcc1bb86f53a6d84d98ff..e0c03a618ed4196164f14d4721d4cd67ac5da257 100644 --- a/src/runtime2/component/mod.rs +++ b/src/runtime2/component/mod.rs @@ -2,8 +2,12 @@ mod component_pdl; mod component_context; mod control_layer; mod consensus; +mod component; +mod component_random; +mod component_internet; -pub(crate) use component_pdl::{CompPDL, CompScheduling}; +pub(crate) use component::{Component, CompScheduling}; +pub(crate) use component_pdl::{CompPDL}; pub(crate) use component_context::CompCtx; pub(crate) use control_layer::{ControlId}; @@ -13,7 +17,7 @@ use super::runtime::*; /// If the component is sleeping, then that flag will be atomically set to /// false. If we're the ones that made that happen then we add it to the work /// queue. -pub(crate) fn wake_up_if_sleeping(sched_ctx: &SchedulerCtx, comp_id: CompId, handle: &CompHandle) { +pub(crate) fn wake_up_if_sleeping(runtime: &RuntimeInner, comp_id: CompId, handle: &CompHandle) { use std::sync::atomic::Ordering; let should_wake_up = handle.sleeping @@ -22,6 +26,6 @@ pub(crate) fn wake_up_if_sleeping(sched_ctx: &SchedulerCtx, comp_id: CompId, han if should_wake_up { let comp_key = unsafe{ comp_id.upgrade() }; - sched_ctx.runtime.enqueue_work(comp_key); + runtime.enqueue_work(comp_key); } } \ No newline at end of file