sched: enforce ref-counting on current task/thread pointers
This commit is contained in:
+4
-2
@@ -6,9 +6,11 @@
|
||||
kern_status_t sys_kern_log(const char *s)
|
||||
{
|
||||
#ifdef TRACE
|
||||
struct task *task = current_task();
|
||||
struct thread *thread = current_thread();
|
||||
struct task *task = get_current_task();
|
||||
struct thread *thread = get_current_thread();
|
||||
printk("%s[%d.%d]: %s", task->t_name, task->t_id, thread->tr_id, s);
|
||||
put_current_thread(thread);
|
||||
put_current_task(task);
|
||||
#else
|
||||
printk("%s", s);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user