Are mutex functions in documentation current?
Are mutex functions in documentation current?
- Subject: Are mutex functions in documentation current?
- From: Kevin Brock <email@hidden>
- Date: Tue, 25 Oct 2005 17:25:26 -0700
In the kernel dcumentation (Kernel Programming, updated August 11,
2005) they talk about a variety of relatively high level lock and
mutex functions, such as mutex_alloc, mutex_free etc.
Now, the header file (lock.h) doesn't appear to be in the kernel
framework installed by the developer tools, and the enetlognke sample
uses the lower-level Mach locking functions.
If I get the lock.h header from the Darwin code, and add a dependency
on com.apple.kernel.6.0 the mutex_* functions work, but I get an
uneasy feeling doing this. Are there side effects from depending on
this that I need to watch out for?
It certainly *looks* as though the document is wrong, and all of
chapter 16 is being deprecated. Is this correct? Are we supposed to
use only the locking functions in locks.h (lck_grp_alloc_init,
lck_mtx_lock et al)? If we're supposed to be able to use mutex_alloc
and friends, why aren't the headers included?
If we *are* supposed to be using only the lower-level functions, my
question becomes one of documentation. There is virtually no
documentation on the net for those locking functions (lck_*) except
the source code. Now, I have nothing against looking at the
sources... I *like* looking at sources most of the time, but sadly I
have to try to meet a deadline this time, and figuring out the
different premutations of lock groups, lock group attributes and such
from scratch would take a while, and would be *really* easy to screw up.
Any help would be appreciated.
Thanks.
Kevin Brock
email@hidden
_______________________________________________
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