Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
kernel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
redox-os
kernel
Commits
5ddd2ca4
Commit
5ddd2ca4
authored
8 years ago
by
Jeremy Soller
Browse files
Options
Downloads
Patches
Plain Diff
Update coreutils, remove sys:memory
parent
aebe7152
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lib.rs
+8
-7
8 additions, 7 deletions
lib.rs
scheme/sys/memory.rs
+0
-10
0 additions, 10 deletions
scheme/sys/memory.rs
scheme/sys/mod.rs
+0
-2
0 additions, 2 deletions
scheme/sys/mod.rs
with
8 additions
and
19 deletions
lib.rs
+
8
−
7
View file @
5ddd2ca4
...
...
@@ -98,7 +98,7 @@ pub extern fn userspace_init() {
syscall
::
exec
(
b"/bin/init"
,
&
[])
.expect
(
"failed to execute init"
);
panic!
(
"init returned"
)
panic!
(
"init returned"
)
;
}
/// Allow exception handlers to send signal to arch-independant kernel
...
...
@@ -151,7 +151,13 @@ pub extern fn kmain(cpus: usize) {
/// This is the main kernel entry point for secondary CPUs
#[no_mangle]
pub
extern
fn
kmain_ap
(
id
:
usize
)
{
pub
extern
fn
kmain_ap
(
_id
:
usize
)
{
// Disable APs for now
loop
{
unsafe
{
interrupt
::
enable_and_halt
();
}
}
/*
CPU_ID.store(id, Ordering::SeqCst);
context::init();
...
...
@@ -159,11 +165,6 @@ pub extern fn kmain_ap(id: usize) {
let pid = syscall::getpid();
println!("AP {}: {:?}", id, pid);
// Disable APs for now
loop
{
unsafe
{
interrupt
::
enable_and_halt
();
}
}
/*
loop {
unsafe {
interrupt::disable();
...
...
This diff is collapsed.
Click to expand it.
scheme/sys/memory.rs
deleted
100644 → 0
+
0
−
10
View file @
aebe7152
use
collections
::
Vec
;
use
arch
::
memory
::{
free_frames
,
used_frames
};
use
syscall
::
error
::
Result
;
pub
fn
resource
()
->
Result
<
Vec
<
u8
>>
{
let
string
=
format!
(
"Memory Used: {} KB
\n
Memory Free: {} KB
\n
"
,
used_frames
()
*
4
,
free_frames
()
*
4
);
Ok
(
string
.into_bytes
())
}
This diff is collapsed.
Click to expand it.
scheme/sys/mod.rs
+
0
−
2
View file @
5ddd2ca4
...
...
@@ -12,7 +12,6 @@ use syscall::scheme::Scheme;
mod
context
;
mod
cpu
;
mod
exe
;
mod
memory
;
mod
scheme
;
//mod interrupt;
//mod log;
...
...
@@ -41,7 +40,6 @@ impl SysScheme {
files
.insert
(
b"context"
,
Box
::
new
(
move
||
context
::
resource
()));
files
.insert
(
b"cpu"
,
Box
::
new
(
move
||
cpu
::
resource
()));
files
.insert
(
b"exe"
,
Box
::
new
(
move
||
exe
::
resource
()));
files
.insert
(
b"memory"
,
Box
::
new
(
move
||
memory
::
resource
()));
files
.insert
(
b"scheme"
,
Box
::
new
(
move
||
scheme
::
resource
()));
//files.insert(b"interrupt", Box::new(move || interrupt::resource()));
//files.insert(b"log", Box::new(move || log::resource()));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment