1
0
mirror of https://github.com/sgmarz/osblog.git synced 2024-11-24 02:16:19 +04:00

Add comments.

This commit is contained in:
Stephen Marz 2020-05-18 09:11:41 -04:00
parent c1c8f2876b
commit 55ccc812e6

View File

@ -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;
} }