DragonFly kernel List (threaded) for 2008-05
DragonFly BSD
DragonFly kernel List (threaded) for 2008-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kthread_create and rel_mplock


From: "Sepherosa Ziehau" <sepherosa@xxxxxxxxx>
Date: Mon, 19 May 2008 09:27:49 +0800

On Mon, May 19, 2008 at 3:26 AM, Simon 'corecode' Schubert
<corecode@fs.ei.tum.de> wrote:
> Michael Neumann wrote:
>>
>> If I understand the kthread_create correctly, it will always acquire the
>> mplock (something like a global lock). That means, if I create two
>> threads, they will automatically be serialized (i.e. run sequentially),
>> unless I release the lock within a thread manually. Is that correct?
>
> kthread_* is old stuff and should be avoided.  If possible, use lwkt_*.
> These threads then run without process context and without the mplock.

Threads start with mplock held currently, but if your thread does want
mplock, it will be wise to hold it explicitly.

Best Regards,
sephe

-- 
Live Free or Die



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]