sched: enforce ref-counting on current task/thread pointers

This commit is contained in:
2026-04-01 18:17:05 +01:00
parent 15c2207ab9
commit 512356ac2d
28 changed files with 364 additions and 103 deletions
+2 -1
View File
@@ -44,7 +44,7 @@ unsigned long schedule_timeout(unsigned long ticks)
{
struct timer timer;
struct thread *self = current_thread();
struct thread *self = get_current_thread();
timer.t_entry = QUEUE_ENTRY_INIT;
timer.t_expiry = clock_ticks + ticks;
@@ -58,6 +58,7 @@ unsigned long schedule_timeout(unsigned long ticks)
schedule(SCHED_NORMAL);
remove_timer(&timer);
put_current_thread(self);
return 0;
}