• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Locks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locks


  • Subject: Re: Locks
  • From: Ian Joyner <email@hidden>
  • Date: Sun, 11 Dec 2011 11:06:30 +1100

On 11 Dec 2011, at 01:50, Scott Ribe wrote:

> On Dec 9, 2011, at 4:48 PM, Ian Joyner wrote:
>
>> You are probably looking for something like Dahm locks (invented by Dave Dahm on the Burroughs B5000 in the 1960s). Here is a long paper on locks including this origin:
>>
>> http://pages.cs.wisc.edu/~remzi/OSFEP/threads-locks.pdf
>>
>> Here is an idea of the ALGOL define for acquire:
>>
>> DEFINE
>> ACQUIRELOCK (ID) =
>>    BEGIN
>>      IF READLOCK (PROCESSID, CONTENDERS[ID]) ^= 0 THEN
>>         DO
>>            PROCURE (LOCKS[ID])
>>         UNTIL READLOCK (-1, CONTENDERS[ID]) = 0;
>>      OWNERS  [ID] :=  PROCESSID;
>>    END #
>
> I seriously, seriously, seriously doubt that he wants to be implementing locks by translating Algol, *especially* when key, tricky to get correct, routines are not provided.

I doubt that as well and that was not my suggestion or intention or I could have posted the whole file and suggested he do that (although that code is very old and apparently not in current implementations).

> But then again, based on the Windows code he presented, OP has nothing against re-implementing these functions poorly ;-)
>
> OSAtomic functions could replace the Interlocked functions. But seriously, what's wrong with the available lock functions? Why in the world would you implement your own locks???

That was the intention to get OS X equivalent and to throw in a bit of background and accreditation to Dave Dahm and other visionaries at Burroughs who truly thought different or we'd still be coding machine language.

Ian
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Locks (From: koko <email@hidden>)
 >Re: Locks (From: Ian Joyner <email@hidden>)
 >Re: Locks (From: Scott Ribe <email@hidden>)

  • Prev by Date: Custom View for hierarchy -- NSTreeController or Data Source?
  • Next by Date: Re: How to initiate drag&drop for a filename outside of NSView mouseDown
  • Previous by thread: Re: Locks
  • Next by thread: Safari downloader-like behavior
  • Index(es):
    • Date
    • Thread