Date: Tue, 5 Jan 1999 18:21:20 -0700 From: Nate Williams <nate@mt.sri.com> To: Terry Lambert <tlambert@primenet.com> Cc: nate@mt.sri.com (Nate Williams), wes@softweyr.com, bright@hotjobs.com, hackers@FreeBSD.ORG Subject: Re: question about re-entrancy. Message-ID: <199901060121.SAA11791@mt.sri.com> In-Reply-To: <199901060102.SAA22729@usr05.primenet.com> References: <199901060022.RAA11275@mt.sri.com> <199901060102.SAA22729@usr05.primenet.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> > > Basically, if you lock the code, you can enter the object multiple > > > times for non-conflicting code, but if you lock the object, you can > > > only enter it once. > > > > Not necessarily. A good locking implementation can realize that you've > > already gotten the lock, and can let you continue to keep it. > > (References, etc..) Not too difficult to do, as long as you can > > uniquely ID each individual 'thread of execution'. > > This is true if you are locking from the same thread. My hidden > assumption, which I guess I didn't communicate very well, even > though I thought it was clear in context of the discussion is that > you have two different entities trying to enter the object. Fair enough. How do you determine if an object can be entered multiple times via 'non-conflicting' code? If you can determine it from the code-base, then you can also determine it for object locks. 6 of one, half-dozen of the other. Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901060121.SAA11791>