On Sat, Sep 30, 2000 at 08:23:37PM -0500, Peter Samuelson wrote:
> [Matthew Wilcox]
> > if fcntl took a 4th argument specifying the length of the buffer, i'd
> > recommend a F_GETLKS fcntl. a horrid work around for this would be
> > that the first 4 bytes of the buffer pointed to by the third argument
> > of the fcntl is the length of the buffer.
> Ewwww! You're right, it's horrid. Anyway, I think this one can be
> solved in userspace -- as long as you don't need atomicity. Untested
> code with no error checking:
thanks for snipping the part of my email where i explain this won't work.
process 1 locks bytes 1 to 7 nonexclusively
process 2 locks bytes 2 to 5 nonexclusively
you now can't see the second lock.
and there's no way of seeing the blocked lock. This needs kernel support
-- Revolutions do not require corporate support. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Sep 30 2000 - 21:00:28 EST