Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Aug 2009 09:34:10 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Maslan <maslanbsd@gmail.com>
Cc:        Ed Schouten <ed@80386.nl>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: sosend() and mbuf
Message-ID:  <4A786302.3090709@elischer.org>
In-Reply-To: <319cceca0908040239k2accd7fen402db4c91687a267@mail.gmail.com>
References:  <319cceca0908030119i3432a495ya60aa431dab0e1b1@mail.gmail.com>	<86k51k4kvl.fsf@ds4.des.no> <86fxc84ksj.fsf@ds4.des.no>	<200908040138.14743.max@love2party.net>	<319cceca0908040227hf9a0f92jbf05b11e9f974994@mail.gmail.com>	<20090804093036.GN1292@hoeg.nl> <319cceca0908040239k2accd7fen402db4c91687a267@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Maslan wrote:
> I'm getting crazy,
> 
> I don't know why kern_open() works in the module's main thread, but
> when I use it in another thread created by kthread_create() it crashes
> the kernel ???
> 

kernel threads may not have a file descriptor table.
so kern_open may not work on kernel processes..
(just speculating)

> 
> On Tue, Aug 4, 2009 at 9:30 AM, Ed Schouten<ed@80386.nl> wrote:
>> Hi,
>>
>> * Maslan <maslanbsd@gmail.com> wrote:
>>> man kthread says:
>>> The kthread_create() function is used to create a kernel thread.  The new
>>>      thread shares its address space with process 0, the swapper process, and
>>              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>      runs in kernel mode only.
>>>
>>> However, when i checked the pid & tid of the new created thread it was
>>> not the same as the parent nor as the proc0 & thread0
>> I am not sure, but sharing another process's address space doesn't have
>> to imply it shares the same pid, right?
>>
>> --
>>  Ed Schouten <ed@80386.nl>
>>  WWW: http://80386.nl/
>>
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"




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