summaryrefslogtreecommitdiffstats
path: root/rsnix/src/interrupts.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--rsnix/src/interrupts.rs (renamed from src/interrupts.rs)4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interrupts.rs b/rsnix/src/interrupts.rs
index 90d5bbb..8f2acd7 100644
--- a/src/interrupts.rs
+++ b/rsnix/src/interrupts.rs
@@ -174,7 +174,7 @@ impl KeyBuf {
174 let h = self.head.load(Ordering::Acquire); 174 let h = self.head.load(Ordering::Acquire);
175 let next = t.wrapping_add(1); 175 let next = t.wrapping_add(1);
176 // Full if the distance between head and tail == capacity (256). 176 // Full if the distance between head and tail == capacity (256).
177 if next.wrapping_sub(h) as u16 > 255 { 177 if next.wrapping_sub(h) > 255 {
178 return; // drop — ring is full 178 return; // drop — ring is full
179 } 179 }
180 unsafe { 180 unsafe {
@@ -362,7 +362,7 @@ pub fn init() {
362 362
363 // Build the IDTR pseudo-descriptor. 363 // Build the IDTR pseudo-descriptor.
364 IDTR = [ 364 IDTR = [
365 (256u16 * 16 - 1) as u16, // limit = 256*16 - 1 365 ((256u16 * 16 - 1)), // limit = 256*16 - 1
366 idt_ptr as u16, // base lo 366 idt_ptr as u16, // base lo
367 (idt_ptr as u64 >> 16) as u16, // base mid 367 (idt_ptr as u64 >> 16) as u16, // base mid
368 (idt_ptr as u64 >> 32) as u16, // base hi 368 (idt_ptr as u64 >> 32) as u16, // base hi