gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] hook questions


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] hook questions
Date: Wed, 14 Jan 2004 17:49:08 -0800


On Jan 14, 2004, at 17:43, Robert Collins wrote:

Npo, because if you don't lock where I'm suggesting, the race condition
can allow two competing commits to both succeed:

commit A sees that X-1 is the current
commit B sees that X-1 is the current
commit A & B both set X in their files.
now, A is a slower machine, and B
locks, commits, unlocks
before A trys to lock.

In tla, in particular, you lock the patch you have, though, right? The lock no longer exists in that patch when you go to aquire it. At this point, you abort the commit because it's out of date, anyway.

        In your scenario (with my understanding of arch locking):

commit A sees that X-1 is the current (local)
commit B sees that X-1 is the current (local)
commit A & B both set X in their files.
now, A is a slower machine, and B
locks X-1, commits, unlocks
A attempts to aquire lock X-1 and fails, update/replay required

--
Dustin Sallings





reply via email to

[Prev in Thread] Current Thread [Next in Thread]