sched: enforce ref-counting on current task/thread pointers
This commit is contained in:
+2
-1
@@ -175,7 +175,7 @@ void object_wait_signal(
|
||||
uint32_t signals,
|
||||
unsigned long *irq_flags)
|
||||
{
|
||||
struct thread *self = current_thread();
|
||||
struct thread *self = get_current_thread();
|
||||
struct wait_item waiter;
|
||||
wait_item_init(&waiter, self);
|
||||
for (;;) {
|
||||
@@ -189,4 +189,5 @@ void object_wait_signal(
|
||||
object_lock_irqsave(obj, irq_flags);
|
||||
}
|
||||
thread_wait_end(&waiter, &obj->ob_wq);
|
||||
put_current_thread(self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user