Re: see if a mutex lock is taken?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=ueVL5EsBhgMTf+MchC/M2+vvVGnJZrQVJeuePKIx52Q=; b=L/j9t75Wv/ct+gl5N/XZt0Vjq1fmWreslesiiAqPuK44Eo4icw+CV1CZOxd+Y2pU2hIRQ0dqZZSWQ9nCZyCsR9lYrvnH/olQ9P6zf7Hz5A4OQSegYEzetIQVhE1FHygT0/UE+juMGxc/jmKgGcNWETtbMSayBOsVNF6sG/ufFIU= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=f7URXlwCMjSXCRgXu1pz8aHMwDdxIrDvflDbz/hcTLVaMOQKRnmNPXP0t21RA9GxnuSs1osEtQYb62/5TWtUDjoLI0TcwkyIZQ2ZSIjA9U/wytJxKoOy7rDzzXaEAjZJck8gyRcwFqp752B7k4pyPCrKTsBSSck8TOzphZmvbvs= hi Greg, yep these mechanisms exist, this is the first things that you implement when you write a lock system no matter on what: islockable and islocked try to understand, what you do (if you use a lck object (locked)) if your lock object has been created, a lock has been aquired when you create a lock object, the lock system test it for you -mmw On Feb 11, 2008 12:01 PM, Greg <greg@kinostudios.com> wrote:
On Feb 11, 2008, at 2:49 PM, mm w wrote:
hi greg,
lock.h
extern boolean_t mutex_try( mutex_t *mutex);
whatever it depends of your xnu version
-mmw
Hmm... I've found this in the sources to xnu, but I can't find this in the Kernel.framework. Perhaps I should have mentioned that I'm writing a kernel extension. Does this exist for kernel extensions, and if so how do I access it? Right now I'm just linking against Kernel.framework, which doesn't seem to have this header.
Thanks!
- Greg
-- -mmw _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
mm w