mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +04:00
Add comments.
This commit is contained in:
parent
c1c8f2876b
commit
55ccc812e6
@ -9,6 +9,9 @@ use crate::cpu::get_mtime;
|
|||||||
pub fn schedule() -> usize {
|
pub fn schedule() -> usize {
|
||||||
let mut frame_addr: usize = 0x1111;
|
let mut frame_addr: usize = 0x1111;
|
||||||
unsafe {
|
unsafe {
|
||||||
|
// If we can't get the lock, then usually this means a kernel
|
||||||
|
// process has the lock. So, we return 0. This has a special
|
||||||
|
// meaning to whomever calls the scheduler to say "nobody else got scheduled"
|
||||||
if PROCESS_LIST_MUTEX.try_lock() == false {
|
if PROCESS_LIST_MUTEX.try_lock() == false {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user