site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=gXplYZp/yQlYfvjumX9+MbRqMR9GqW12F6Djg8028os=; b=MBbPWkr5xiYRcaakTf/ybV+3OgZypTuU/aSjwLB7DQpoLanx/1cG8i8pM2skqswT8c UzI2et6mBHL2a2CFDRTJfNAkxYRK8D3kcotFgDsCndqJAPr2DKC+Qtpb/npYkv2CI3Qj 3+E3HJV7SJpeO3SJEzoP8E4tnJmpWlD6P1qKA= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=DXkQpzqw2R8sRIR1KTJvhU/fugi6SKosZY2cKm7jqteqhS17p2gdKBcYkyfEYQzF22 IzCRASN0RMput4QL1cedKlwXmN73UIkC4PAo1rnqtYsWB9P5vkP7gTj78NtYUOQdl6iZ ANMDvFqmBkq0fa1FenusjOeHH470BXe2mnjyg= On May 28, 2009, at 04:08 , Karan, Cem (Civ, ARL/CISD) wrote: "For each lock obtained" is supposed to mean "for each successful rdlock call". The POSIX description is more explicit: "A thread may hold multiple concurrent read locks on rwlock (that is, successfully call the pthread_rwlock_rdlock() function n times). If so, the thread must perform matching unlocks (that is, it must call the pthread_rwlock_unlock() function n times)." http://www.opengroup.org/onlinepubs/009695399/functions/pthrea d_rwlock_rdlock.html That is MUCH clearer! Unless someone has already modified the man pages, I'll file a bug report requesting that they change the page to match the above. First off, I apologize for messing up the subject line in my last post; I hit the send button a little too quickly. Greg Parker wrote on Wednesday, May 27, 2009 4:40 PM That's definitely clearer, but the man page does say that the results of obtaining a read or write lock when the current thread already holds the opposite type of lock are undefined. Since returning EDEADLOCK is optional, Apple probably wants to choose what to do in the future, so the best choice is to ensure that your code never does this through review or some other mechanism (as annoying as that is). _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Jason Coco