Re: Thread locks in 10.3
Re: Thread locks in 10.3
- Subject: Re: Thread locks in 10.3
- From: Michael Smith <email@hidden>
- Date: Wed, 18 Oct 2006 10:36:20 -0700
On Oct 18, 2006, at 9:17 AM, Carl Smith wrote: I have a network kernel extension I am using in 10.3. I also have the same extension in 10.4 which is working fine. I have some several threads going from the Application side that call into the kernel so in 10.4 I lock the portions I am calling using lck_mtx_lock in the extension. My question is, for 10.3 is thread_funnel_set the same as the lck_mtx_lock call in 10.4? And am I approaching the locking of an extension call the correct way using lck_mtx_lock in 10.4 and thread_funnel_set in 10.3? The suspicion I would have from the way you've worded the above is that you are using a mutex in the same fashion as the old funnel; to guard code critical regions.
The locking design in 10.4 emphasises protection of data objects, not codepaths; this means that the strict answer to your first question is no, the two are not necessarily analagous.
To answer your second question, yes, those are the right calls to be making, but you should be using them in entirely different ways.
HTH
= Mike |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden