Re: Trylocks in the kernel
Re: Trylocks in the kernel
- Subject: Re: Trylocks in the kernel
- From: Brian Bergstrand <email@hidden>
- Date: Tue, 13 Dec 2005 11:21:36 -0600
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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.
I've had a radar open on this issue for 6 months now:
rdar://4136250
I believe Sam V. from SGI opened one too. You should open your own
too. It will be marked as duplicate, but in the backwards world of
non-public access bugs, more duplicates means more attention.
I'm trying to figure out how to get around this. I need to take a
read-write lock in a socket filter dataIn callback, but of course
you cannot block inside dataIn for any length of time. So I _was_
going to use a trylock, and if I failed to get the lock, just bail
out. But it looks like the only way to accomplish what I want to do
is to use lck_rw_sleep_deadline.
Haven't used this, so I can't comment.
Brian Bergstrand
<http://www.bergstrand.org/brian/> PGP Key ID: 0xB6C7B6A2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFDnwMledHYW7bHtqIRAiD8AKCLJVeDumv1SmQ6uiShPvnfZekZwgCg8y6E
AnSgcvbfzyx1qh0Ol84mYfU=
=uHtB
-----END PGP SIGNATURE-----
_______________________________________________
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