mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
Kernel: Make Thread use AK::Time internally
This commit is very invasive, because Thread likes to take a pointer and write to it. This means that translating between timespec/timeval/Time would have been more difficult than just changing everything that hands a raw pointer to Thread, in bulk.
This commit is contained in:
parent
65b36e42b8
commit
2b6546c40a
14 changed files with 66 additions and 82 deletions
|
@ -398,10 +398,8 @@ void UHCIController::do_debug_transfer()
|
|||
void UHCIController::spawn_port_proc()
|
||||
{
|
||||
RefPtr<Thread> usb_hotplug_thread;
|
||||
timespec sleep_time {};
|
||||
|
||||
sleep_time.tv_sec = 1;
|
||||
Process::create_kernel_process(usb_hotplug_thread, "UHCIHotplug", [&, sleep_time] {
|
||||
Process::create_kernel_process(usb_hotplug_thread, "UHCIHotplug", [&] {
|
||||
for (;;) {
|
||||
for (int port = 0; port < UHCI_ROOT_PORT_COUNT; port++) {
|
||||
u16 port_data = 0;
|
||||
|
@ -448,7 +446,7 @@ void UHCIController::spawn_port_proc()
|
|||
}
|
||||
}
|
||||
}
|
||||
(void)Thread::current()->sleep(sleep_time);
|
||||
(void)Thread::current()->sleep(Time::from_seconds(1));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue