Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Fri, 19 Aug 2022 11:40:14 +0200 | Subject | Re: [PATCH] kernel: exit: cleanup release_thread() |
| |
Hi Kefeng,
On Fri, Aug 19, 2022 at 3:39 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote: > Only x86 has own release_thread(), introduce a new weak > release_thread() function to clean empty definitions in > other ARCHs. > > Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> arch/m68k/include/asm/processor.h | 5 -----
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
> --- a/kernel/exit.c > +++ b/kernel/exit.c > @@ -183,6 +183,10 @@ void put_task_struct_rcu_user(struct task_struct *task) > call_rcu(&task->rcu, delayed_put_task_struct); > } > > +void __weak release_thread(struct task_struct *dead_task) > +{ > +}
As the default implementation is empty, it might be better to keep this as a static inline function, protected by #ifndef release_thread, and let x86 #define release_thread.
> + > void release_task(struct task_struct *p) > { > struct task_struct *leader;
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |