diff --git a/doc/compositor/trait.CompositableRegion.html b/doc/compositor/trait.CompositableRegion.html index d39215c90f..c62dc234c8 100644 --- a/doc/compositor/trait.CompositableRegion.html +++ b/doc/compositor/trait.CompositableRegion.html @@ -31,16 +31,16 @@ The dest_coord is the coordinate in the destination buffer (relative to its top-left corner) where the src_fb will be composited (starting at the src_fb’s top-left corner). src_fb_row_range is the index range of rows in the source framebuffer to blend.

-

Implementations on Foreign Types§

source§

impl CompositableRegion for Coord

source§

fn row_range(&self) -> Range<isize>

source§

fn size(&self) -> usize

source§

fn blend_buffers<P: Pixel>( +

Implementations on Foreign Types§

source§

impl CompositableRegion for Rectangle

source§

fn row_range(&self) -> Range<isize>

source§

fn size(&self) -> usize

source§

fn blend_buffers<P: Pixel>( &self, src_fb: &Framebuffer<P>, dest_fb: &mut Framebuffer<P>, dest_coord: Coord, - _src_fb_row_range: Range<usize> -) -> Result<(), &'static str>

source§

impl CompositableRegion for Rectangle

source§

fn row_range(&self) -> Range<isize>

source§

fn size(&self) -> usize

source§

fn blend_buffers<P: Pixel>( + src_fb_row_range: Range<usize> +) -> Result<(), &'static str>

source§

impl CompositableRegion for Coord

source§

fn row_range(&self) -> Range<isize>

source§

fn size(&self) -> usize

source§

fn blend_buffers<P: Pixel>( &self, src_fb: &Framebuffer<P>, dest_fb: &mut Framebuffer<P>, dest_coord: Coord, - src_fb_row_range: Range<usize> + _src_fb_row_range: Range<usize> ) -> Result<(), &'static str>

Implementors§

\ No newline at end of file diff --git a/doc/context_switch_regular/fn.context_switch_regular.html b/doc/context_switch_regular/fn.context_switch_regular.html index e12c745e95..173c435cea 100644 --- a/doc/context_switch_regular/fn.context_switch_regular.html +++ b/doc/context_switch_regular/fn.context_switch_regular.html @@ -1,4 +1,4 @@ -context_switch_regular in context_switch_regular - Rust
pub unsafe extern "C" fn context_switch_regular(
+context_switch_regular in context_switch_regular - Rust
pub unsafe extern "C" fn context_switch_regular(
     _prev_stack_pointer: *mut usize,
     _next_stack_pointer_value: usize
 )
Expand description

Switches context from a regular Task to another regular Task.

diff --git a/doc/context_switch_regular/fn.read_first_register.html b/doc/context_switch_regular/fn.read_first_register.html index 98fd88f740..2f19fe650a 100644 --- a/doc/context_switch_regular/fn.read_first_register.html +++ b/doc/context_switch_regular/fn.read_first_register.html @@ -1,4 +1,4 @@ -read_first_register in context_switch_regular - Rust
pub extern "C" fn read_first_register() -> usize
Expand description

Reads the value of the first register from the actual CPU register hardware.

+read_first_register in context_switch_regular - Rust
pub extern "C" fn read_first_register() -> usize
Expand description

Reads the value of the first register from the actual CPU register hardware.

This can be called at any time, but is intended for use as the second half of “saving and restoring” a register value. The first half was a previous call to ContextRegular::set_first_register(), diff --git a/doc/context_switch_regular/macro.restore_registers_regular.html b/doc/context_switch_regular/macro.restore_registers_regular.html index cc284ebe27..fd6c6f125a 100644 --- a/doc/context_switch_regular/macro.restore_registers_regular.html +++ b/doc/context_switch_regular/macro.restore_registers_regular.html @@ -1,4 +1,4 @@ -restore_registers_regular in context_switch_regular - Rust

macro_rules! restore_registers_regular {
+restore_registers_regular in context_switch_regular - Rust
macro_rules! restore_registers_regular {
     () => { ... };
 }
Expand description

An assembly block for restoring regular x86_64 registers by popping them off of the stack.

diff --git a/doc/context_switch_regular/macro.save_registers_regular.html b/doc/context_switch_regular/macro.save_registers_regular.html index 47d30275e8..c24e10e5a3 100644 --- a/doc/context_switch_regular/macro.save_registers_regular.html +++ b/doc/context_switch_regular/macro.save_registers_regular.html @@ -1,4 +1,4 @@ -save_registers_regular in context_switch_regular - Rust
macro_rules! save_registers_regular {
+save_registers_regular in context_switch_regular - Rust
macro_rules! save_registers_regular {
     () => { ... };
 }
Expand description

An assembly block for saving regular x86_64 registers by pushing them onto the stack.

diff --git a/doc/context_switch_regular/macro.switch_stacks.html b/doc/context_switch_regular/macro.switch_stacks.html index 970d52b215..7571839c0a 100644 --- a/doc/context_switch_regular/macro.switch_stacks.html +++ b/doc/context_switch_regular/macro.switch_stacks.html @@ -1,4 +1,4 @@ -switch_stacks in context_switch_regular - Rust
macro_rules! switch_stacks {
+switch_stacks in context_switch_regular - Rust
macro_rules! switch_stacks {
     () => { ... };
 }
Expand description

An assembly block for switching stacks, which is the integral part of the actual context switching routine.

diff --git a/doc/context_switch_regular/struct.ContextRegular.html b/doc/context_switch_regular/struct.ContextRegular.html index 9e3c296b73..59fcb3f3bb 100644 --- a/doc/context_switch_regular/struct.ContextRegular.html +++ b/doc/context_switch_regular/struct.ContextRegular.html @@ -1,9 +1,9 @@ -ContextRegular in context_switch_regular - Rust
#[repr(C, packed)]
pub struct ContextRegular { /* private fields */ }
Expand description

The registers saved before a context switch and restored after a context switch.

+ContextRegular in context_switch_regular - Rust
#[repr(C, packed)]
pub struct ContextRegular { /* private fields */ }
Expand description

The registers saved before a context switch and restored after a context switch.

Note: the order of the registers here MUST MATCH the order of registers popped in the [restore_registers_regular!] macro.

-

Implementations§

source§

impl ContextRegular

source

pub fn new(rip: usize) -> ContextRegular

Creates a new ContextRegular struct that will cause the +

Implementations§

source§

impl ContextRegular

source

pub fn new(rip: usize) -> ContextRegular

Creates a new ContextRegular struct that will cause the Task containing it to begin its execution at the given rip.

-
source

pub fn set_first_register(&mut self, value: usize)

Sets the value of the first register to the given value.

+
source

pub fn set_first_register(&mut self, value: usize)

Sets the value of the first register to the given value.

This is useful for storing a value (e.g., task ID) in that register and then recovering it later with read_first_register().

On x86_64, this sets the r15 register.

diff --git a/doc/implementors/core/convert/trait.From.js b/doc/implementors/core/convert/trait.From.js index 7c2c5d4740..08287404a3 100644 --- a/doc/implementors/core/convert/trait.From.js +++ b/doc/implementors/core/convert/trait.From.js @@ -1,7 +1,7 @@ (function() {var implementors = { "async_channel":[["impl From<Error> for Error"]], "cpu":[["impl From<Option<CpuId>> for OptionalCpuId"],["impl From<OptionalCpuId> for Option<CpuId>"],["impl From<CpuId> for ApicId"],["impl From<ApicId> for CpuId"]], -"framebuffer":[["impl From<Color> for AlphaPixel"],["impl From<Color> for RGBPixel"]], +"framebuffer":[["impl From<Color> for RGBPixel"],["impl From<Color> for AlphaPixel"]], "io":[["impl From<IoError> for String"],["impl<'io, IO, L, B> From<B> for LockableIo<'io, IO, L, B>where\n IO: 'io + ?Sized,\n L: for<'a> Lockable<'a, IO> + ?Sized,\n B: Borrow<L>,"],["impl<RW> From<RW> for ByteWriterWrapper<RW>where\n RW: BlockReader + BlockWriter,"],["impl From<IoError> for Error"],["impl From<IoError> for &'static str"],["impl<RW> From<RW> for ByteReaderWriterWrapper<RW>where\n RW: BlockReader + BlockWriter,"],["impl From<&'static str> for IoError"],["impl<R> From<R> for ByteReaderWrapper<R>where\n R: BlockReader,"]], "memory_structs":[["impl From<PageRange> for CopyablePageRange"],["impl From<CopyablePageRange> for PageRange"],["impl From<CopyableFrameRange> for FrameRange"],["impl From<FrameRange> for CopyableFrameRange"]], "mlx_ethernet":[["impl From<CommandQueueError> for &'static str"]], diff --git a/doc/implementors/core/fmt/trait.Debug.js b/doc/implementors/core/fmt/trait.Debug.js index 2940b9486d..f7508bb52a 100644 --- a/doc/implementors/core/fmt/trait.Debug.js +++ b/doc/implementors/core/fmt/trait.Debug.js @@ -22,7 +22,7 @@ "fadt":[["impl Debug for Fadt"]], "fault_log":[["impl Debug for RecoveryAction"],["impl Debug for FaultType"],["impl Debug for FaultEntry"]], "frame_allocator":[["impl<const S: MemoryState> Debug for Frames<S>"],["impl<'f> Debug for AllocatedFrame<'f>"],["impl Debug for PhysicalMemoryRegion"],["impl Debug for MemoryRegionType"]], -"framebuffer":[["impl Debug for AlphaPixel"],["impl Debug for RGBPixel"]], +"framebuffer":[["impl Debug for RGBPixel"],["impl Debug for AlphaPixel"]], "fs_node":[["impl Debug for FileOrDir"]], "gdt":[["impl Debug for AvailableSegmentSelector"]], "hpet":[["impl Debug for HpetAcpiTable"]], diff --git a/doc/implementors/core/hash/trait.Hash.js b/doc/implementors/core/hash/trait.Hash.js index 5035695e00..102659cf63 100644 --- a/doc/implementors/core/hash/trait.Hash.js +++ b/doc/implementors/core/hash/trait.Hash.js @@ -4,7 +4,7 @@ "boot_info":[["impl Hash for ElfSectionFlags"]], "cpu":[["impl Hash for CpuId"]], "crate_swap":[["impl Hash for SwapRequest"]], -"framebuffer":[["impl<P: Pixel> Hash for Framebuffer<P>"],["impl Hash for AlphaPixel"],["impl Hash for RGBPixel"]], +"framebuffer":[["impl Hash for AlphaPixel"],["impl<P: Pixel> Hash for Framebuffer<P>"],["impl Hash for RGBPixel"]], "keycodes_ascii":[["impl Hash for KeyboardModifiers"]], "memory":[["impl<T: FromBytes + Hash, M: Mutability, B: Borrow<MappedPages>> Hash for BorrowedMappedPages<T, M, B>"],["impl<T: FromBytes + Hash, M: Mutability, B: Borrow<MappedPages>> Hash for BorrowedSliceMappedPages<T, M, B>"]], "memory_structs":[["impl Hash for VirtualAddress"],["impl Hash for PhysicalAddress"]], diff --git a/doc/implementors/core/marker/trait.Copy.js b/doc/implementors/core/marker/trait.Copy.js index 50825f771a..6363657521 100644 --- a/doc/implementors/core/marker/trait.Copy.js +++ b/doc/implementors/core/marker/trait.Copy.js @@ -11,7 +11,7 @@ "dmar":[["impl Copy for DmarRhsa"],["impl Copy for DmarSatc"],["impl Copy for DmarEntryRecord"],["impl Copy for DmarRmrr"],["impl Copy for DmarAndd"],["impl Copy for DeviceScopePath"],["impl Copy for DmarAtsr"]], "fadt":[["impl Copy for Fadt"]], "frame_allocator":[["impl Copy for MemoryRegionType"]], -"framebuffer":[["impl Copy for AlphaPixel"],["impl Copy for RGBPixel"]], +"framebuffer":[["impl Copy for RGBPixel"],["impl Copy for AlphaPixel"]], "gdt":[["impl Copy for AvailableSegmentSelector"]], "hpet":[["impl Copy for HpetAcpiTable"]], "idle":[["impl Copy for IdleState"]], diff --git a/doc/search-index.js b/doc/search-index.js index 9e480dbbcc..adb03e0109 100644 --- a/doc/search-index.js +++ b/doc/search-index.js @@ -138,7 +138,7 @@ var searchIndex = JSON.parse('{\ "scheduler_priority":{"doc":"This scheduler implements a priority algorithm.","t":"DLLLLFFLFFLLL","n":["PriorityInheritanceGuard","borrow","borrow_mut","drop","from","get_priority","inherit_priority","into","select_next_task","set_priority","try_from","try_into","type_id"],"q":[[0,"scheduler_priority"]],"d":["Lowers the task’s priority to its previous value when …","","","","Returns the argument unchanged.","","Modifies the given task’s priority to be the maximum of …","Calls U::from(self).","This defines the priority scheduler policy. Returns None …","","","",""],"i":[0,1,1,1,1,0,0,1,0,0,1,1,1],"f":[0,[[]],[[]],[1],[[]],[2,[[4,[3]]]],[2,1],[[]],[3,[[4,[2]]]],[[2,3]],[[],5],[[],5],[[],6]],"c":[],"p":[[3,"PriorityInheritanceGuard"],[3,"TaskRef"],[15,"u8"],[4,"Option"],[4,"Result"],[3,"TypeId"]]},\ "scheduler_round_robin":{"doc":"This crate picks the next task in round robin fashion. …","t":"DLLLFLFLLL","n":["PriorityInheritanceGuard","borrow","borrow_mut","from","inherit_priority","into","select_next_task","try_from","try_into","type_id"],"q":[[0,"scheduler_round_robin"]],"d":["","","","Returns the argument unchanged.","","Calls U::from(self).","This defines the round robin scheduler policy. Returns …","","",""],"i":[0,2,2,2,0,2,0,2,2,2],"f":[0,[[]],[[]],[[]],[1,2],[[]],[3,[[4,[1]]]],[[],5],[[],5],[[],6]],"c":[],"p":[[3,"TaskRef"],[3,"PriorityInheritanceGuard"],[15,"u8"],[4,"Option"],[4,"Result"],[3,"TypeId"]]},\ "sdt":{"doc":"ACPI table definitions and basic SDT structures.","t":"DRDMMMMLLLLMLLMMLLLLLLMMMMMMMLLLLLL","n":["GenericAddressStructure","SDT_SIZE_IN_BYTES","Sdt","access_size","address_space","bit_offset","bit_width","borrow","borrow","borrow_mut","borrow_mut","checksum","clone","clone","creator_id","creator_revision","fmt","fmt","from","from","into","into","length","oem_id","oem_revision","oem_table_id","phys_addr","revision","signature","try_from","try_from","try_into","try_into","type_id","type_id"],"q":[[0,"sdt"]],"d":["A struct used to describe the position and layout of …","The size in bytes of the ACPI SDT Header (Sdt struct).","An ACPI System Descriptor Table. This is the header (the …","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Calls U::from(self).","Calls U::from(self).","","","","","","","","","","","","",""],"i":[0,0,0,2,2,2,2,1,2,1,2,1,1,2,1,1,1,2,1,2,1,2,1,1,1,1,2,1,1,1,2,1,2,1,2],"f":[0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],0,[1,1],[2,2],0,0,[[1,3],4],[[2,3],4],[[]],[[]],[[]],[[]],0,0,0,0,0,0,0,[[],5],[[],5],[[],5],[[],5],[[],6],[[],6]],"c":[],"p":[[3,"Sdt"],[3,"GenericAddressStructure"],[3,"Formatter"],[6,"Result"],[4,"Result"],[3,"TypeId"]]},\ -"serial_port":{"doc":"A full serial driver with more advanced I/O support, e.g., …","t":"NNNNDNDNDEDENNLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLFLLFLLLLLLMLLLLLLLLFLFLLLLLLLLLLLLLLLLLLLLLLLL","n":["COM1","COM2","COM3","COM4","DataChunk","DataReceived","DataSenderAlreadyExists","ErrorOrBreak","SerialPort","SerialPortAddress","SerialPortBasic","SerialPortInterruptEvent","StatusChange","TransmitterEmpty","base_port_address","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","data","data_available","deref","deref_mut","drop","empty","enable_interrupt","eq","flush","fmt","fmt","fmt","from","from","from","from","from","from","from_str","get_serial_port","in_byte","in_bytes","init_serial_port","into","into","into","into","into","into","len","new","new","out_byte","out_bytes","out_str","read","ready_to_transmit","register_interrupt_handler","set_connection_listener","set_data_sender","take_serial_port_basic","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","write","write_str","write_str"],"q":[[0,"serial_port"]],"d":["The base port I/O address for the COM1 serial port.","The base port I/O address for the COM2 serial port.","The base port I/O address for the COM3 serial port.","The base port I/O address for the COM4 serial port.","A chunk of data read from a serial port that will be …","","An empty error type indicating that a data sender could …","","A serial port abstraction with support for interrupt-based …","The base port I/O addresses for COM serial ports.","A serial port and its various data and control registers.","The types of events that can trigger an interrupt on a …","","","","","","","","","","","","","","","","","","","Returns true if the serial port has data available to read.","","","","Returns a new DataChunk filled with zeroes that can be …","Enable or disable interrupts on this serial port for …","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Obtains a reference to the SerialPort specified by the …","Read one byte from the serial port, blocking until data is …","Reads multiple bytes from the serial port into the given …","Initializes the SerialPort specified by the given …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Creates and returns a new serial port structure, and …","Initialize this serial port by giving it ownership and …","Write the given byte to the serial port, blocking until …","Write the given bytes to the serial port, blocking until …","Write the given string to the serial port, blocking until …","","Returns true if the serial port is ready to transmit a …","Register the interrupt handler for this serial port and …","A temporary hack to allow the serial port interrupt handler","Tells this SerialPort to push received data bytes onto the …","Takes ownership of the SerialPort specified by the given …","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[2,2,2,2,0,6,0,6,0,0,0,0,6,6,1,1,4,2,5,11,6,1,4,2,5,11,6,2,2,5,1,4,4,1,5,1,2,4,2,11,6,1,4,2,5,11,6,2,0,1,1,0,1,4,2,5,11,6,5,1,4,1,1,1,4,1,4,0,4,0,2,1,4,2,2,2,5,11,6,1,4,2,5,11,6,1,4,2,5,11,6,4,1,4],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[2,2],[[]],0,[1,3],[4],[4],[1],[[],5],[[1,6,3]],[[2,2],3],[4,7],[[2,8],[[10,[9]]]],[[11,8],12],[[6,8],[[10,[9]]]],[[]],[[]],[[]],[[]],[[]],[[]],[13,[[10,[2]]]],[2,[[16,[[15,[[14,[4]]]]]]]],[1,17],[[1,[18,[17]]],19],[[2,1],[[16,[[15,[[14,[4]]]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[20,1],[1,4],[[1,17]],[[1,[18,[17]]]],[[1,13]],[[4,[18,[17]]],[[7,[19]]]],[1,3],[[[15,[[14,[4]]]],21,22],[[10,[13]]]],[[[23,[2]]],[[23,[2]]]],[[4,[23,[5]]],[[10,[11]]]],[2,[[16,[1]]]],[[]],[[],10],[[],10],[[],10],[13,[[10,[2]]]],[20,[[10,[2]]]],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[4,[18,[17]]],[[7,[19]]]],[[1,13],[[10,[9]]]],[[4,13],12]],"c":[],"p":[[3,"SerialPortBasic"],[4,"SerialPortAddress"],[15,"bool"],[3,"SerialPort"],[3,"DataChunk"],[4,"SerialPortInterruptEvent"],[6,"Result"],[3,"Formatter"],[3,"Error"],[4,"Result"],[3,"DataSenderAlreadyExists"],[6,"Result"],[15,"str"],[6,"IrqSafeMutex"],[3,"Arc"],[4,"Option"],[15,"u8"],[15,"slice"],[15,"usize"],[15,"u16"],[6,"InterruptNumber"],[6,"HandlerFunc"],[3,"Sender"],[3,"TypeId"]]},\ +"serial_port":{"doc":"A full serial driver with more advanced I/O support, e.g., …","t":"NNNNDNDNDEDENNLLLLLLLLLLLLLLLMLLLLLLLLLLLLLLLLLLFLLFLLLLLLMLLLLLLLLFLFLLLLLLLLLLLLLLLLLLLLLLLL","n":["COM1","COM2","COM3","COM4","DataChunk","DataReceived","DataSenderAlreadyExists","ErrorOrBreak","SerialPort","SerialPortAddress","SerialPortBasic","SerialPortInterruptEvent","StatusChange","TransmitterEmpty","base_port_address","borrow","borrow","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone_into","data","data_available","deref","deref_mut","drop","empty","enable_interrupt","eq","flush","fmt","fmt","fmt","from","from","from","from","from","from","from_str","get_serial_port","in_byte","in_bytes","init_serial_port","into","into","into","into","into","into","len","new","new","out_byte","out_bytes","out_str","read","ready_to_transmit","register_interrupt_handler","set_connection_listener","set_data_sender","take_serial_port_basic","to_owned","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","type_id","type_id","write","write_str","write_str"],"q":[[0,"serial_port"]],"d":["The base port I/O address for the COM1 serial port.","The base port I/O address for the COM2 serial port.","The base port I/O address for the COM3 serial port.","The base port I/O address for the COM4 serial port.","A chunk of data read from a serial port that will be …","","An empty error type indicating that a data sender could …","","A serial port abstraction with support for interrupt-based …","The base port I/O addresses for COM serial ports.","A serial port and its various data and control registers.","The types of events that can trigger an interrupt on a …","","","","","","","","","","","","","","","","","","","Returns true if the serial port has data available to read.","","","","Returns a new DataChunk filled with zeroes that can be …","Enable or disable interrupts on this serial port for …","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Obtains a reference to the SerialPort specified by the …","Read one byte from the serial port, blocking until data is …","Reads multiple bytes from the serial port into the given …","Initializes the SerialPort specified by the given …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Creates and returns a new serial port structure, and …","Initialize this serial port by giving it ownership and …","Write the given byte to the serial port, blocking until …","Write the given bytes to the serial port, blocking until …","Write the given string to the serial port, blocking until …","","Returns true if the serial port is ready to transmit a …","Register the interrupt handler for this serial port and …","A temporary hack to allow the serial port interrupt handler","Tells this SerialPort to push received data bytes onto the …","Takes ownership of the SerialPort specified by the given …","","","","","","","","","","","","","","","","","","","","","","","",""],"i":[2,2,2,2,0,6,0,6,0,0,0,0,6,6,1,1,4,2,5,11,6,1,4,2,5,11,6,2,2,5,1,4,4,1,5,1,2,4,2,11,6,1,4,2,5,11,6,2,0,1,1,0,1,4,2,5,11,6,5,1,4,1,1,1,4,1,4,0,4,0,2,1,4,2,2,2,5,11,6,1,4,2,5,11,6,1,4,2,5,11,6,4,1,4],"f":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,[1,2],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[2,2],[[]],0,[1,3],[4],[4],[1],[[],5],[[1,6,3]],[[2,2],3],[4,7],[[2,8],[[10,[9]]]],[[11,8],12],[[6,8],[[10,[9]]]],[[]],[[]],[[]],[[]],[[]],[[]],[13,[[10,[2]]]],[2,[[16,[[15,[[14,[4]]]]]]]],[1,17],[[1,[18,[17]]],19],[[2,1],[[16,[[15,[[14,[4]]]]]]]],[[]],[[]],[[]],[[]],[[]],[[]],0,[20,1],[1,4],[[1,17]],[[1,[18,[17]]]],[[1,13]],[[4,[18,[17]]],[[7,[19]]]],[1,3],[[[15,[[14,[4]]]],21,22],[[10,[13]]]],[[[23,[2]]],[[23,[2]]]],[[4,[23,[5]]],[[10,[11]]]],[2,[[16,[1]]]],[[]],[[],10],[[],10],[13,[[10,[2]]]],[20,[[10,[2]]]],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],10],[[],24],[[],24],[[],24],[[],24],[[],24],[[],24],[[4,[18,[17]]],[[7,[19]]]],[[1,13],[[10,[9]]]],[[4,13],12]],"c":[],"p":[[3,"SerialPortBasic"],[4,"SerialPortAddress"],[15,"bool"],[3,"SerialPort"],[3,"DataChunk"],[4,"SerialPortInterruptEvent"],[6,"Result"],[3,"Formatter"],[3,"Error"],[4,"Result"],[3,"DataSenderAlreadyExists"],[6,"Result"],[15,"str"],[6,"IrqSafeMutex"],[3,"Arc"],[4,"Option"],[15,"u8"],[15,"slice"],[15,"usize"],[15,"u16"],[6,"InterruptNumber"],[6,"HandlerFunc"],[3,"Sender"],[3,"TypeId"]]},\ "serial_port_basic":{"doc":"Support for basic serial port access, including …","t":"NNNNNNDEENNLLLLLLLLLLLLLLLLLLLLLLLLLLLLFLLLLLLLLLLLL","n":["COM1","COM2","COM3","COM4","DataReceived","ErrorOrBreak","SerialPort","SerialPortAddress","SerialPortInterruptEvent","StatusChange","TransmitterEmpty","base_port_address","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","clone","data_available","drop","enable_interrupt","eq","fmt","fmt","from","from","from","from_str","in_byte","in_bytes","into","into","into","new","out_byte","out_bytes","out_str","ready_to_transmit","take_serial_port","try_from","try_from","try_from","try_from","try_from","try_into","try_into","try_into","type_id","type_id","type_id","write_str"],"q":[[0,"serial_port_basic"]],"d":["The base port I/O address for the COM1 serial port.","The base port I/O address for the COM2 serial port.","The base port I/O address for the COM3 serial port.","The base port I/O address for the COM4 serial port.","","","A serial port and its various data and control registers.","The base port I/O addresses for COM serial ports.","The types of events that can trigger an interrupt on a …","","","","","","","","","","","Returns true if the serial port has data available to read.","","Enable or disable interrupts on this serial port for …","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Read one byte from the serial port, blocking until data is …","Reads multiple bytes from the serial port into the given …","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Creates and returns a new serial port structure, and …","Write the given byte to the serial port, blocking until …","Write the given bytes to the serial port, blocking until …","Write the given string to the serial port, blocking until …","Returns true if the serial port is ready to transmit a …","Takes ownership of the SerialPort specified by the given …","","","","","","","","","","","",""],"i":[2,2,2,2,4,4,0,0,0,4,4,1,1,2,4,1,2,4,2,1,1,1,2,2,4,1,2,4,2,1,1,1,2,4,1,1,1,1,1,0,1,2,2,2,4,1,2,4,1,2,4,1],"f":[0,0,0,0,0,0,0,0,0,0,0,[1,2],[[]],[[]],[[]],[[]],[[]],[[]],[2,2],[1,3],[1],[[1,4,3]],[[2,2],3],[[2,5],6],[[4,5],6],[[]],[[]],[[]],[7,[[8,[2]]]],[1,9],[[1,[10,[9]]],11],[[]],[[]],[[]],[12,1],[[1,9]],[[1,[10,[9]]]],[[1,7]],[1,3],[2,[[13,[1]]]],[[],8],[7,[[8,[2]]]],[12,[[8,[2]]]],[[],8],[[],8],[[],8],[[],8],[[],8],[[],14],[[],14],[[],14],[[1,7],6]],"c":[],"p":[[3,"SerialPort"],[4,"SerialPortAddress"],[15,"bool"],[4,"SerialPortInterruptEvent"],[3,"Formatter"],[6,"Result"],[15,"str"],[4,"Result"],[15,"u8"],[15,"slice"],[15,"usize"],[15,"u16"],[4,"Option"],[3,"TypeId"]]},\ "shapes":{"doc":"This crate defines the basic shapes used for display.","t":"DDLLLLLLLMLLLLLLLLLLLLLLLLLLLMLLLLLLLMM","n":["Coord","Rectangle","add","add","add","borrow","borrow","borrow_mut","borrow_mut","bottom_right","clone","clone","cmp","eq","eq","fmt","fmt","from","from","hash","hash","height","into","into","new","partial_cmp","sub","sub","sub","top_left","try_from","try_from","try_into","try_into","type_id","type_id","width","x","y"],"q":[[0,"shapes"]],"d":["A 2-D integer coordinate.","A rectangle given by its top-left coordinate and …","","","","","","","","The bottom-right point","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","","","Returns the height of this Rectangle.","Calls U::from(self).","Calls U::from(self).","Creates a new coordinate.","","","","","The top-left point","","","","","","","Returns the width of this Rectangle.","The x coordinate","The y coordinate"],"i":[0,0,1,1,2,1,2,1,2,2,1,2,1,1,2,1,2,1,2,1,2,2,1,2,1,1,1,1,2,2,1,2,1,2,1,2,2,1,1],"f":[0,0,[[1,1],1],[1,1],[[2,1],2],[[]],[[]],[[]],[[]],0,[1,1],[2,2],[[1,1],3],[[1,1],4],[[2,2],4],[[1,5],6],[[2,5],6],[[]],[[]],[[1,7]],[[2,7]],[2,8],[[]],[[]],[[9,9],1],[[1,1],[[10,[3]]]],[1,1],[[1,1],1],[[2,1],2],0,[[],11],[[],11],[[],11],[[],11],[[],12],[[],12],[2,8],0,0],"c":[],"p":[[3,"Coord"],[3,"Rectangle"],[4,"Ordering"],[15,"bool"],[3,"Formatter"],[6,"Result"],[8,"Hasher"],[15,"usize"],[15,"isize"],[4,"Option"],[4,"Result"],[3,"TypeId"]]},\ "signal_handler":{"doc":"Signal handlers for CPU exceptions/errors, like …","t":"DNNENNNNEDZLLLLLLLLLLLLLLLLLLMLLLLLLLLLLMLLLLLFMMFLLLLLLLLLLLLLLLMM","n":["AlreadyRegistered","ArithmeticError","BusError","ErrorCode","IllegalInstruction","InvalidAddress","Other","PageFaultError","Signal","SignalContext","SignalHandler","borrow","borrow","borrow","borrow","borrow_mut","borrow_mut","borrow_mut","borrow_mut","clone","clone","clone","clone_into","clone_into","clone_into","cmp","eq","eq","eq","error_code","fmt","fmt","fmt","fmt","from","from","from","from","from","hash","instruction_pointer","into","into","into","into","partial_cmp","register_signal_handler","signal","stack_pointer","take_signal_handler","to_owned","to_owned","to_owned","try_from","try_from","try_from","try_from","try_into","try_into","try_into","try_into","type_id","type_id","type_id","type_id","accessed_address","pf_error"],"q":[[0,"signal_handler"],[65,"signal_handler::ErrorCode"]],"d":["An error type indicating a handler had already been …","Bad arithmetic operation, e.g., divide by zero. Analogous …","Bad memory alignment, non-existent physical address. …","Possible error codes that may be provided by the CPU …","Invalid opcode, malformed instruction, etc. Analogous to …","Bad virtual address, unexpected page fault. Analogous to …","","","The possible signals that may occur due to CPU exceptions.","Information that is passed to a registered SignalHandler …","A signal handler is a callback function that will be …","","","","","","","","","","","","","","","","","","","","","","","","Returns the argument unchanged.","Returns the argument unchanged.","Returns the argument unchanged.","","Returns the argument unchanged.","","","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","Calls U::from(self).","","Register a SignalHandler callback function for the current …","","","Take the SignalHandler registered for the given signal for …","","","","","","","","","","","","","","","","",""],"i":[0,1,1,0,1,1,3,3,0,0,0,6,1,2,3,6,1,2,3,1,2,3,1,2,3,1,1,2,3,2,6,1,2,3,6,1,2,3,3,1,2,6,1,2,3,1,0,2,2,0,1,2,3,6,1,2,3,6,1,2,3,6,1,2,3,16,16],"f":[0,0,0,0,0,0,0,0,0,0,0,[[]],[[]],[[]],[[]],[[]],[[]],[[]],[[]],[1,1],[2,2],[3,3],[[]],[[]],[[]],[[1,1],4],[[1,1],5],[[2,2],5],[[3,3],5],0,[[6,7],8],[[1,7],8],[[2,7],8],[[3,7],8],[[]],[[]],[[]],[9,3],[[]],[[1,10]],0,[[]],[[]],[[]],[[]],[[1,1],[[11,[4]]]],[[1,[13,[12]]],[[14,[6]]]],0,0,[1,[[11,[[13,[12]]]]]],[[]],[[]],[[]],[[],14],[[],14],[[],14],[[],14],[[],14],[[],14],[[],14],[[],14],[[],15],[[],15],[[],15],[[],15],0,0],"c":[],"p":[[4,"Signal"],[3,"SignalContext"],[4,"ErrorCode"],[4,"Ordering"],[15,"bool"],[3,"AlreadyRegistered"],[3,"Formatter"],[6,"Result"],[15,"u64"],[8,"Hasher"],[4,"Option"],[25,"SignalHandler"],[3,"Box"],[4,"Result"],[3,"TypeId"],[13,"PageFaultError"]]},\ diff --git a/doc/serial_port/struct.SerialPort.html b/doc/serial_port/struct.SerialPort.html index 25f20d0f88..abffc6b15e 100644 --- a/doc/serial_port/struct.SerialPort.html +++ b/doc/serial_port/struct.SerialPort.html @@ -43,20 +43,20 @@
Special characters if there are no bytes available to be read, indicating that the read would block.

source§

fn read(&mut self, buf: &mut [u8]) -> Result<usize>

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more
§

fn read_to_end(&mut self, buf: &mut Vec<u8, Global>) -> Result<usize, Error>

Read all bytes until EOF in this source, placing them into buf. Read more
§

fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>

Read all bytes until EOF in this source, appending them to buf. Read more
§

unsafe fn initializer(&self) -> Initializer

Determines if this Reader can work with buffers of uninitialized -memory. Read more
§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
§

fn by_ref(&mut self) -> &mut Selfwhere +memory. Read more

§

fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>

Read the exact number of bytes required to fill buf. Read more
§

fn by_ref(&mut self) -> &mut Selfwhere Self: Sized,

Creates a “by reference” adaptor for this instance of Read. Read more
§

fn bytes(self) -> Bytes<Self>where Self: Sized,

Transforms this Read instance to an Iterator over its bytes. Read more
§

fn chain<R>(self, next: R) -> Chain<Self, R>where R: Read, Self: Sized,

Creates an adaptor which will chain this stream with another. Read more
§

fn take(self, limit: u64) -> Take<Self>where - Self: Sized,

Creates an adaptor which will read at most limit bytes from it. Read more
source§

impl Write for SerialPort

Forward the implementation of core::fmt::Write to the inner SerialPortBasic.

-
source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write -succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more
source§

impl Write for SerialPort

A blocking implementation of [core2::io::Write] that will write bytes from the given buf + Self: Sized,

Creates an adaptor which will read at most limit bytes from it. Read more
source§

impl Write for SerialPort

A blocking implementation of [core2::io::Write] that will write bytes from the given buf to the SerialPort, waiting until it is ready to transfer all bytes.

The flush() function is a no-op, since the SerialPort does not have buffering.

source§

fn write(&mut self, buf: &[u8]) -> Result<usize>

Write a buffer into this writer, returning how many bytes were written. Read more
source§

fn flush(&mut self) -> Result<()>

Flush this output stream, ensuring that all intermediately buffered -contents reach their destination. Read more
§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error -encountered. Read more
§

fn by_ref(&mut self) -> &mut Selfwhere - Self: Sized,

Creates a “by reference” adaptor for this instance of Write. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere +contents reach their destination. Read more

§

fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>

Attempts to write an entire buffer into this writer. Read more
§

fn write_fmt(&mut self, fmt: Arguments<'_>) -> Result<(), Error>

Writes a formatted string into this writer, returning any error +encountered. Read more
§

fn by_ref(&mut self) -> &mut Selfwhere + Self: Sized,

Creates a “by reference” adaptor for this instance of Write. Read more
source§

impl Write for SerialPort

Forward the implementation of core::fmt::Write to the inner SerialPortBasic.

+
source§

fn write_str(&mut self, s: &str) -> Result

Writes a string slice into this writer, returning whether the write +succeeded. Read more
1.1.0 · source§

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 · source§

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

diff --git a/doc/spawn/fn.cleanup_bootstrap_tasks.html b/doc/spawn/fn.cleanup_bootstrap_tasks.html index da64e74f65..ca6b17de8e 100644 --- a/doc/spawn/fn.cleanup_bootstrap_tasks.html +++ b/doc/spawn/fn.cleanup_bootstrap_tasks.html @@ -1,4 +1,4 @@ -cleanup_bootstrap_tasks in spawn - Rust
pub fn cleanup_bootstrap_tasks(num_tasks: u32) -> Result<(), &'static str>
Expand description

Spawns a dedicated task to cleanup all bootstrap tasks +cleanup_bootstrap_tasks in spawn - Rust

pub fn cleanup_bootstrap_tasks(num_tasks: u32) -> Result<(), &'static str>
Expand description

Spawns a dedicated task to cleanup all bootstrap tasks by reaping them, i.e., taking their exit value.

This allows them to be fully dropped and cleaned up safely, as it would be invalid to reap and cleanup bootstrap tasks diff --git a/doc/spawn/fn.init.html b/doc/spawn/fn.init.html index cee88398e5..373621c4cd 100644 --- a/doc/spawn/fn.init.html +++ b/doc/spawn/fn.init.html @@ -1,4 +1,4 @@ -init in spawn - Rust

Function spawn::init

source ·
pub fn init(
+init in spawn - Rust

Function spawn::init

source ·
pub fn init(
     kernel_mmi_ref: MmiRef,
     cpu_id: CpuId,
     stack: NoDrop<Stack>
diff --git a/doc/spawn/fn.new_application_task_builder.html b/doc/spawn/fn.new_application_task_builder.html
index 7613c5cf1c..bbb3170cdb 100644
--- a/doc/spawn/fn.new_application_task_builder.html
+++ b/doc/spawn/fn.new_application_task_builder.html
@@ -1,4 +1,4 @@
-new_application_task_builder in spawn - Rust
pub fn new_application_task_builder(
+new_application_task_builder in spawn - Rust
pub fn new_application_task_builder(
     crate_object_file: Path,
     new_namespace: Option<Arc<CrateNamespace>>
 ) -> Result<TaskBuilder<fn(_: Vec<String>) -> isize, Vec<String>, isize>, &'static str>
Expand description

Creates a builder for a new application Task.

diff --git a/doc/spawn/fn.new_task_builder.html b/doc/spawn/fn.new_task_builder.html index e4f15a4cfc..c462ee97c7 100644 --- a/doc/spawn/fn.new_task_builder.html +++ b/doc/spawn/fn.new_task_builder.html @@ -1,4 +1,4 @@ -new_task_builder in spawn - Rust

Function spawn::new_task_builder

source ·
pub fn new_task_builder<F, A, R>(func: F, argument: A) -> TaskBuilder<F, A, R>where
+new_task_builder in spawn - Rust

Function spawn::new_task_builder

source ·
pub fn new_task_builder<F, A, R>(func: F, argument: A) -> TaskBuilder<F, A, R>where
     A: Send + 'static,
     R: Send + 'static,
     F: FnOnce(A) -> R,
Expand description

Creates a builder for a new Task that starts at the given entry point function func diff --git a/doc/spawn/index.html b/doc/spawn/index.html index aec92afb83..30917ba1a4 100644 --- a/doc/spawn/index.html +++ b/doc/spawn/index.html @@ -1,4 +1,4 @@ -spawn - Rust

Crate spawn

source ·
Expand description

This crate offers routines for spawning new tasks +spawn - Rust

Crate spawn

source ·
Expand description

This crate offers routines for spawning new tasks and convenient builder patterns for customizing new tasks.

The two functions of interest to create a TaskBuilder are:

//! This crate contains structures and routines for context switching 
 //! when SSE/SIMD extensions are not active. 
 
@@ -166,6 +172,7 @@
 #[derive(FromBytes)]
 #[repr(C, packed)]
 pub struct ContextRegular {
+    rflags: usize,
     r15: usize, 
     r14: usize,
     r13: usize,
@@ -187,6 +194,9 @@
     /// Task containing it to begin its execution at the given `rip`.
     pub fn new(rip: usize) -> ContextRegular {
         ContextRegular {
+            // The ninth bit is the interrupt enable flag. When a task is first
+            // run, interrupts should already be enabled.
+            rflags: 1 << 9,
             r15: 0,
             r14: 0,
             r13: 0,
@@ -244,6 +254,7 @@
             push r13
             push r14
             push r15
+            pushfq
         "#
     );
 }
@@ -278,6 +289,7 @@
     () => (
         // Restore the next task's general purpose registers.
         r#" 
+            popfq
             pop r15
             pop r14
             pop r13
diff --git a/doc/src/spawn/lib.rs.html b/doc/src/spawn/lib.rs.html
index 27a14da88b..1322dc5fb0 100644
--- a/doc/src/spawn/lib.rs.html
+++ b/doc/src/spawn/lib.rs.html
@@ -1019,10 +1019,6 @@
 1019
 1020
 1021
-1022
-1023
-1024
-1025
 
//! This crate offers routines for spawning new tasks
 //! and convenient builder patterns for customizing new tasks. 
 //! 
@@ -1053,7 +1049,6 @@
 use cpu::CpuId;
 use debugit::debugit;
 use spin::Mutex;
-use irq_safety::enable_interrupts;
 use memory::{get_kernel_mmi_ref, MmiRef};
 use stack::Stack;
 use task::{Task, TaskRef, RestartInfo, RunState, JoinableTaskRef, ExitableTaskRef, FailureCleanupFunction};
@@ -1688,7 +1683,13 @@
     R: Send + 'static,
     F: FnOnce(A) -> R,
 {
-    let task_entry_func;
+    // The first time a task runs, its entry function `task_wrapper()` is
+    // jumped to from the `task_switch()` function, right after the context
+    // switch occured. However, we set the context of the new task to have
+    // interrupts enabled (in `ContextRegular::new`), so interrupts are enabled
+    // as soon as the new task is switched to.
+
+    let task_entry_func;
     let task_arg;
     let recovered_preemption_guard;
     let exitable_taskref;
@@ -1732,16 +1733,7 @@
         );
     }
 
-    // The first time that a task runs, its entry function `task_wrapper()` is jumped to
-    // from the `task_switch()` function, right after the context switch occurred.
-    // Since the `task_switch()` function was originally invoked from an interrupt handler,
-    // interrupts were disabled but never had the chance to be re-enabled
-    // because we did not return from the interrupt handler as usual.
-    // Therefore, we need to re-enable interrupts and preemption here to ensure that
-    // things continue to run as normal, with interrupts and preemption enabled
-    // such that we can properly preempt this task.
-    drop(recovered_preemption_guard);
-    enable_interrupts();
+    drop(recovered_preemption_guard);
 
     // This synchronizes with the acquire fence in `JoinableTaskRef::join()`.
     fence(Ordering::Release);