> >>Like this:
> >>
> >> For every process ID slot {
> >> if we dont' have a slot yet and the slot is empty {
> >>
> >>
> > -> We are preempted
> >
> >
> But we stiil hold the exclusive lock on the whole file, and
> without that, no other process can lock a process ID slot.
>
> Sorry, thought of that. :-)
Oh, I see... Sorry, I looked at just your pseudocode, not realizing you were
still including the 'master lock' from Keith's pseudocode.
Incidentally, this code:
if the slot is still used {
Recovery is needed
Mark the slot empty
}
Release process lock slot
should probably be:
if the slot is still used {
Recovery is needed
}
if we do not have a slot yet {
mark the slot as ours
we have a slot now
} else {
Release process lock slot
}
While I'm here, I think I should note that fcntl locking works over NFS,
while flock() locking (under Linux) does not. Since a lot of people have
asked for Subversion support over NFS, that's a good thing :)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Dec 23 17:33:35 2004