Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Apr 2012 08:22:06 +0200
From:      Grzegorz Bernacki <gjb@semihalf.com>
To:        Andrew Thompson <thompsa@FreeBSD.org>
Cc:        svn-src-projects@freebsd.org, Grzegorz Bernacki <gber@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r233982 - projects/nand/sys/fs/nandfs
Message-ID:  <4F7FDD0E.3090106@semihalf.com>
In-Reply-To: <CAFAOGNSc6H%2B2R9riepm-4odB8YCiYZrpjitKUkjmCxiMVsnUMA@mail.gmail.com>
References:  <201204070520.q375KFJs044288@svn.freebsd.org> <CAFAOGNSc6H%2B2R9riepm-4odB8YCiYZrpjitKUkjmCxiMVsnUMA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
W dniu 2012-04-07 08:10, Andrew Thompson pisze:
> On 7 April 2012 17:20, Grzegorz Bernacki<gber@freebsd.org>  wrote:
>> Author: gber
>> Date: Sat Apr  7 05:20:14 2012
>> New Revision: 233982
>> URL: http://svn.freebsd.org/changeset/base/233982
>>
>> Log:
>>   nandfs: Add nandfs cleaner.
>>
>>   Obtained from: Semihalf
>>   Supported by:  FreeBSD Foundation, Juniper Networks
>>
>> Added: projects/nand/sys/fs/nandfs/nandfs_cleaner.c
>> ==============================================================================
>> --- /dev/null   00:00:00 1970   (empty, because file is newly added)
>> +++ projects/nand/sys/fs/nandfs/nandfs_cleaner.c        Sat Apr  7 05:20:14 2012        (r233982)
>> +nandfs_start_cleaner(struct nandfs_device *fsdev)
>> +{
>> +       int error;
>> +
>> +       MPASS(fsdev->nd_cleaner == NULL);
>> +
>> +       fsdev->nd_cleaner_exit = 0;
>> +
>> +       error = kproc_create((void(*)(void *))nandfs_cleaner, fsdev,
>> +&fsdev->nd_cleaner, 0, 0, "nandfs_cleaner");
> Unless you particularly wanted nandfs_cleaner to show up in the
> process table you can use kthread_add() to make this a thread of
> pid-0. Likewise kproc_kthread_add() allows you to easily add all the
> nand processes as threads of a new proc. There are examples of each if
> you search the kernel sources.
Hi,

Thanks for information. I think we can use  kthread_add(). I see no 
reason to have this
thread shown in process table.

thanks,
Grzesiek



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4F7FDD0E.3090106>