Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-14239-914332
OSKernel2022-FTLOS
Commits
c2fab41d
Commit
c2fab41d
authored
2 years ago
by
FTL OS
Browse files
Options
Download
Patches
Plain Diff
修改调度
parent
1667b2fa
master
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/kernel/src/main.rs
+6
-11
code/kernel/src/main.rs
with
6 additions
and
11 deletions
+6
-11
code/kernel/src/main.rs
+
6
−
11
View file @
c2fab41d
...
...
@@ -138,12 +138,7 @@ pub fn kmain(_hart_id: usize) -> ! {
sstatus
::
clear_sum
();
}
let
entry_id
=
ENTER_CNT
.fetch_add
(
1
,
Ordering
::
Relaxed
);
if
entry_id
==
2
{
loop
{
while
memory
::
own_try_handle
()
{}
// timer::set_next_trigger_ex(Duration::from_micros(10));
}
}
let
mut
spin_end
:
Option
<
Instant
>
=
None
;
loop
{
if
executor
::
run_until_idle
()
!=
0
{
...
...
@@ -153,17 +148,17 @@ pub fn kmain(_hart_id: usize) -> ! {
spin_end
=
None
;
continue
;
}
if
entry_id
!=
0
{
while
memory
::
own_try_handle
()
{
spin_end
=
None
;
}
}
#[cfg(feature
=
"submit"
)]
{
if
entry_id
<
2
{
continue
;
}
}
if
entry_id
==
3
{
while
memory
::
own_try_handle
()
{
spin_end
=
None
;
}
}
let
now
=
timer
::
now
();
match
spin_end
{
None
=>
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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
Menu
Explore
Projects
Groups
Topics
Snippets