forked from Bananymous/banan-os
				
			Kernel: panic now disables interrupts as the first thing
This commit is contained in:
		
							parent
							
								
									9756de02ef
								
							
						
					
					
						commit
						ba8c4dbc7f
					
				| 
						 | 
					@ -13,10 +13,10 @@ namespace Kernel
 | 
				
			||||||
		__attribute__((__noreturn__))
 | 
							__attribute__((__noreturn__))
 | 
				
			||||||
		static void panic_impl(const char* file, int line, const char* message, Args... args)
 | 
							static void panic_impl(const char* file, int line, const char* message, Args... args)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
 | 
								asm volatile("cli");
 | 
				
			||||||
			derrorln("Kernel panic at {}:{}", file, line);
 | 
								derrorln("Kernel panic at {}:{}", file, line);
 | 
				
			||||||
			derrorln(message, args...);
 | 
								derrorln(message, args...);
 | 
				
			||||||
			Debug::dump_stack_trace();
 | 
								Debug::dump_stack_trace();
 | 
				
			||||||
			asm volatile("cli");
 | 
					 | 
				
			||||||
			for (;;)
 | 
								for (;;)
 | 
				
			||||||
				asm volatile("hlt");
 | 
									asm volatile("hlt");
 | 
				
			||||||
			__builtin_unreachable();
 | 
								__builtin_unreachable();
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue