diff options
Diffstat (limited to 'oryxc/src')
| -rw-r--r-- | oryxc/src/compiler.rs | 11 | ||||
| -rw-r--r-- | oryxc/src/prelude.rs | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/oryxc/src/compiler.rs b/oryxc/src/compiler.rs index a9119bc..dffb941 100644 --- a/oryxc/src/compiler.rs +++ b/oryxc/src/compiler.rs @@ -244,15 +244,12 @@ fn worker_loop( stealers: Arc<[Stealer<Job>]>, ) { loop { - if state.njobs.load(Ordering::Acquire) == 0 { - break; - } - let Some(job) = find_task(&queue, &state.globalq, &stealers) else { - // no work available; check termination condition before parking to - // avoid missed wakeups + /* No work available; check termination condition before + * parking to avoid missed wakeups */ if state.njobs.load(Ordering::Acquire) == 0 { - break; + state.wake_all(); + return; } thread::park(); continue; diff --git a/oryxc/src/prelude.rs b/oryxc/src/prelude.rs index 4fe1413..32a123f 100644 --- a/oryxc/src/prelude.rs +++ b/oryxc/src/prelude.rs @@ -36,7 +36,7 @@ pub struct Symbol { pub enum OryxType { Integer { bits: usize, signed: bool }, Pointer { base: u32 }, - Function { args: Vec<u32>, rets: Vec<u32> }, + Function { args: Vec<u32>, rets: Vec<u32> }, } #[derive(Clone, Copy)] |