Changeset - a5594f90afa6
[Not reviewed]
0 3 0
mh - 3 years ago 2022-03-23 14:29:24
contact@maxhenger.nl
Fix bug in select statement
3 files changed with 25 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/runtime2/component/component_ip.rs
Show inline comments
 
use crate::protocol::eval::*;
 
use crate::runtime2::*;
 
use super::*;
 

	
 
/// TODO: Temporary component to figure out what to do with custom components.
 
///     This component sends random numbers between two u32 limits
 
struct ComponentRandSend {
 
}
 

	
 
impl Component for ComponentRandSend {
 
    fn adopt_message(&mut self, _comp_ctx: &mut CompCtx, _message: DataMessage) {
 
        unreachable!("should not adopt messages");
 
    }
 

	
 
    fn handle_message(&mut self, sched_ctx: &mut SchedulerCtx, comp_ctx: &mut CompCtx, message: Message) {
 
        todo!()
 
    }
 

	
 
    fn run(&mut self, sched_ctx: &mut SchedulerCtx, comp_ctx: &mut CompCtx) -> Result<CompScheduling, EvalError> {
 
        todo!()
 
    }
 
}
 
\ No newline at end of file
src/runtime2/component/component_pdl.rs
Show inline comments
 
@@ -285,10 +285,10 @@ impl Component for CompPDL {
 
        // Depending on the mode don't do anything at all, take some special
 
        // actions, or fall through and run the PDL code.
 
        match self.mode {
 
            Mode::NonSync | Mode::Sync | Mode::BlockedSelect => {
 
            Mode::NonSync | Mode::Sync => {
 
                // continue and run PDL code
 
            },
 
            Mode::SyncEnd | Mode::BlockedGet | Mode::BlockedPut => {
 
            Mode::SyncEnd | Mode::BlockedGet | Mode::BlockedPut | Mode::BlockedSelect => {
 
                return Ok(CompScheduling::Sleep);
 
            }
 
            Mode::StartExit => {
src/runtime2/component/mod.rs
Show inline comments
 
@@ -3,6 +3,7 @@ mod component_context;
 
mod control_layer;
 
mod consensus;
 
mod component;
 
mod component_ip;
 

	
 
pub(crate) use component::{Component, CompScheduling};
 
pub(crate) use component_pdl::{CompPDL};
0 comments (0 inline, 0 general)