lkml.org 
[lkml]   [2023]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC] kthread: Unify kernel_thread() and user_mode_thread()
On Tue,  9 May 2023 18:41:27 +0800 Huacai Chen <chenhuacai@loongson.cn> wrote:

> Commit 343f4c49f2438d8 ("kthread: Don't allocate kthread_struct for init
> and umh") introduces a new function user_mode_thread() for init and umh.
> But the name is a bit confusing because init and umh are indeed kernel
> threads at creation time, the real difference is "they will become user
> processes". So let's unify the kernel_thread() and user_mode_thread() to
> kernel_thread() again, and add a new 'user' parameter for init and umh.
>
> ...
>
> 5 files changed, 9 insertions(+), 26 deletions(-)
>

Less code is nice.

> -extern pid_t user_mode_thread(int (*fn)(void *), void *arg, unsigned long flags);
> + unsigned long flags, int user);

`bool user'?


\
 
 \ /
  Last update: 2023-05-13 01:56    [W:0.286 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site