Thread (9 messages) 9 messages, 9 authors, 2022-08-21

Re: [PATCH] kernel: exit: cleanup release_thread()

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2022-08-19 09:40:54
Also in: linux-alpha, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-um, lkml, loongarch, sparclinux

Hi Kefeng,

On Fri, Aug 19, 2022 at 3:39 AM Kefeng Wang [off-list ref] 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 <redacted>
 arch/m68k/include/asm/processor.h       | 5 -----
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
quoted hunk ↗ jump to hunk
--- 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help