Re: Trylocks in the kernel
Re: Trylocks in the kernel
- Subject: Re: Trylocks in the kernel
- From: Peter Lovell <email@hidden>
- Date: Thu, 15 Dec 2005 09:02:09 -0500
On Dec 14, 2005, at 7:00 PM, Sam Vaughan wrote:
On 15/12/2005, at 7:03 AM, email@hidden wrote:
On Dec 13, 2005, at 9:21 AM, Brian Bergstrand wrote:
On Dec 13, 2005, at 12:23 AM, Ryan McGann wrote:
The new Tiger locking KPIs seem to lack a trylock variant for any
of the lock types (mutex, spinlock, read/write).
A mutex try variant is available in the Unsupported KPI. It's
probably safe to use this for 8.0, but may break in the next major
release.
All of the try variants are in the kernel proper, so one has to
wonder why they are not exported in the KPI.
Well they also have a way to promote read-write locks to exclusive
from shared exported in the kernel, but not in the KPIs
(lck_rw_exclusive_to_shared and lck_rw_shared_to_exclusive). That bug
was closed :-( It would be really nice to have those KPIs back in the
supported list, if anybody is listening...
Hear Hear.
Amongst the 30 kernel symbols we need that are preventing us from
using the 10.4 KPI I see the following locking functions:
_lck_mtx_try_lock
_lck_rw_done
_lck_rw_lock_exclusive_to_shared_gen
_lck_rw_try_lock_exclusive
_lck_rw_try_lock_shared
_lck_spin_try_lock
My bugs have been marked "Duplicate", so someone's aware of the
issue. All the same I think we need to push this at WWDC next
year. A locking API that doesn't export try functions and requires
you to keep track of whether an rwlock is held shared or exclusive
when you unlock it simply isn't complete in my opinion.
Sam
I add my vote to this request. I don't care what Yoda says, there
*does* need to be "try".
Regards.....Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden