Skip to content

Commit e014285

Browse files
committed
Rename QuantumPortal to VeraPortal
1 parent 688baff commit e014285

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

crates/chloroplast/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
2525

2626
#![no_std]
2727

28+
extern crate alloc;
29+
2830
use alloc::{
2931
collections::{btree_set::BTreeSet, vec_deque::VecDeque},
3032
sync::Arc,
@@ -35,8 +37,6 @@ use runner::TaskRunner;
3537
use runtime::{GuardedJob, GuardedJobStatus, RuntimeSupport};
3638
use task::Task;
3739

38-
extern crate alloc;
39-
4040
pub mod runner;
4141
pub mod runtime;
4242
pub mod task;

kernel/src/locks/schedule_lock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
2323
OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2424
*/
2525

26-
use core::fmt::{Debug, Write};
26+
use core::fmt::Debug;
2727
use core::ops::{Deref, DerefMut};
2828
use core::sync::atomic::{AtomicUsize, Ordering};
2929
use core::{cell::UnsafeCell, sync::atomic::AtomicBool};

kernel/src/main.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
3030
#![feature(allocator_api)]
3131
#![feature(naked_functions)]
3232

33+
extern crate alloc;
34+
3335
mod context;
3436
mod gdt;
3537
mod int;
@@ -40,12 +42,10 @@ mod processor;
4042
mod qemu;
4143
mod syscall_handler;
4244
mod timer;
43-
extern crate alloc;
44-
45-
use core::cell::SyncUnsafeCell;
4645

4746
use arch::supports::cpu_vender;
4847
use bootloader::KernelBootHeader;
48+
use core::cell::SyncUnsafeCell;
4949
use lignan::{debug_ready, logln, make_debug};
5050
use mem::{
5151
alloc::{KernelAllocator, provide_init_region},
@@ -76,7 +76,7 @@ extern "C" fn _start(kbh: u64) -> ! {
7676

7777
#[debug_ready]
7878
fn main(kbh: &KernelBootHeader) {
79-
logln!("Welcome to the Quantum Kernel!");
79+
logln!("Welcome to the Vera Kernel!");
8080
logln!(
8181
"Free Memory : {}",
8282
HumanBytes::from(kbh.phys_mem_map.bytes_of(mem::phys::PhysMemoryKind::Free))

kernel/src/syscall_handler.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
2626
use crate::process::{HandleError, Process, scheduler::Scheduler};
2727
use alloc::{format, string::String};
2828
use arch::io::IOPort;
29-
use lignan::{LogKind, logln, warnln};
29+
use lignan::{LogKind, warnln};
3030
use mem::paging::VmPermissions;
31+
use util::consts::PAGE_4K;
3132
use vera_portal::{
3233
ConnectHandleError, DebugMsgError, ExitReason, MapMemoryError, MemoryLocation,
33-
MemoryProtections, QuantumPortal, RecvHandleError, SendHandleError, ServeHandleError,
34-
WaitSignal, sys_server::QuantumPortalServer,
34+
MemoryProtections, RecvHandleError, SendHandleError, ServeHandleError, VeraPortal, WaitSignal,
35+
sys_server::VeraPortalServer,
3536
};
36-
use util::consts::PAGE_4K;
3737

3838
#[unsafe(no_mangle)]
3939
extern "C" fn syscall_handler(
@@ -51,13 +51,13 @@ extern "C" fn syscall_handler(
5151

5252
pub struct KernelSyscalls {}
5353

54-
impl QuantumPortalServer for KernelSyscalls {
54+
impl VeraPortalServer for KernelSyscalls {
5555
fn verify_user_ptr<T: Sized>(_ptr: *const T) -> bool {
5656
true
5757
}
5858
}
5959

60-
impl QuantumPortal for KernelSyscalls {
60+
impl VeraPortal for KernelSyscalls {
6161
fn exit(exit_reason: ExitReason) -> ! {
6262
let current_thread = Scheduler::get().current_thread().upgrade().unwrap();
6363
warnln!(
@@ -90,7 +90,7 @@ impl QuantumPortal for KernelSyscalls {
9090

9191
match location {
9292
MemoryLocation::Anywhere => current_thread.process.map_anon_anywhere(n_pages, vperm),
93-
MemoryLocation::PhysicalLoc(physical_ptr) => {
93+
MemoryLocation::PhysicalLoc(_) => {
9494
todo!()
9595
}
9696
}

portals/vera-portal/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
2828
use portal::portal;
2929

3030
#[portal(protocol = "syscall", global = true)]
31-
pub trait QuantumPortal {
31+
pub trait VeraPortal {
3232
#[event = 0]
3333
fn exit(exit_reason: ExitReason) -> ! {
3434
enum ExitReason {

0 commit comments

Comments
 (0)