Arch context in kernel context
This commit is contained in:
		
							parent
							
								
									f6e57ff5d1
								
							
						
					
					
						commit
						2be7ccaec2
					
				
					 3 changed files with 60 additions and 16 deletions
				
			
		|  | @ -110,12 +110,24 @@ pub mod syscall; | |||
| #[cfg(test)] | ||||
| pub mod tests; | ||||
| 
 | ||||
| pub extern fn context_test() { | ||||
|     print!("TEST\n"); | ||||
| 
 | ||||
|     loop { | ||||
|         unsafe { interrupt::enable_and_halt(); } | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| #[no_mangle] | ||||
| pub extern fn kmain() { | ||||
|     context::init(); | ||||
| 
 | ||||
|     print!("{}", format!("BSP: {:?}\n", syscall::getpid())); | ||||
| 
 | ||||
|     if let Ok(context) = context::contexts_mut().spawn(context_test) { | ||||
| 
 | ||||
|     } | ||||
| 
 | ||||
|     loop { | ||||
|         unsafe { interrupt::enable_and_halt(); } | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Soller
						Jeremy Soller