lkml.org 
[lkml]   [2005]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [linux-pm] [PATCH] Workqueue freezer support.

* Pavel Machek <pavel@ucw.cz> wrote:

> > +struct task_struct *kthread_create(int (*threadfn)(void *data),
> > + void *data,
> > + const char namefmt[], ...)
> > +{
> > + char result[TASK_COMM_LEN];
> > +
> > + va_list args;
> > + va_start(args, namefmt);
> > + vsnprintf(result, TASK_COMM_LEN, namefmt, args);
> > + va_end(args);
> > + return _kthread_create(threadfn, data, 0, result);
> > +}
> > +
>
> This is slightly ugly and uses lot of stack. Otherwise patch looks
> okay. If you want me to apply it, be sure to put me into To: or at
> least Cc:. Or perhaps you want to just mail it to akpm, noting that I
> acked it (if you do something with the char result[] :-).

TASK_COMM_LEN is only 16 bytes so it's not that bad.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-21 17:50    [W:0.120 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site