mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 08:37:17 -04:00
Allow the PIT driver to be removed
This commit is contained in:
parent
c273940e74
commit
10b05a994f
@ -11,6 +11,7 @@
|
||||
namespace pit {
|
||||
|
||||
bool install();
|
||||
void remove();
|
||||
|
||||
} //end of namespace pit
|
||||
|
||||
|
@ -32,7 +32,7 @@ bool pit::install(){
|
||||
timer::frequency(1000);
|
||||
|
||||
if(!interrupt::register_irq_handler(0, timer_handler, nullptr)){
|
||||
logging::logf(logging::log_level::ERROR, "Unable to register PIT 0\n");
|
||||
logging::logf(logging::log_level::ERROR, "Unable to register PIT IRQ handler 0\n");
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -41,3 +41,11 @@ bool pit::install(){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void pit::remove(){
|
||||
if(!interrupt::unregister_irq_handler(0, timer_handler)){
|
||||
logging::logf(logging::log_level::ERROR, "Unable to unregister PIT IRQ handler 0\n");
|
||||
}
|
||||
|
||||
logging::logf(logging::log_level::TRACE, "PIT Driver Removed\n");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user