Re: Multithreaded locks.c

2000-11-04 Thread yodaiken
On Sun, Nov 05, 2000 at 10:57:57AM +1100, Andrew Morton wrote: > Even the DG/UX manpage doesn't say what happens when you sidegrade > the lock. LOCK_EX->LOCK_EX :) Suggested code: printk("Don't do that\n"); return -EKNUCKLEHEAD; --

Re: Multithreaded locks.c

2000-11-04 Thread Andrew Morton
Alan Cox wrote: > > > have got it right. Does anyone know what this part of the > > flock(2) manpage means? > > > >A single file may not simultaneously have both shared and > >exclusive locks. > > AFAIK its saying LOCK_EX is exclusive and blocks shared locks and vice > versa.

Re: Multithreaded locks.c

2000-11-04 Thread Alan Cox
> have got it right. Does anyone know what this part of the > flock(2) manpage means? > >A single file may not simultaneously have both shared and >exclusive locks. AFAIK its saying LOCK_EX is exclusive and blocks shared locks and vice versa. Its a standard reader-writer lock

Multithreaded locks.c

2000-11-04 Thread Andrew Morton
Gentlemen, Here's a patch which fully multithreads the file locking code. The functionality is unchanged, however I wonder if we actually have got it right. Does anyone know what this part of the flock(2) manpage means? A single file may not simultaneously have both shared and