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

Re: Multi-threaded Readers/Writers Lock



On Sun, 9 Sep 2001, Shlomi Fish wrote:

>
> I am looking for an implementation of pthread-based readers/writers lock
> in ANSI C. For the moment, the closest thing I found was the
> implementation inside the ZThreads library:
>
> http://zthread.sourceforge.net/
>
> which is written in C++ and will require some conversion. I also tried
> using flock(), but I'm not sure if it works well across threads.
>
> Does anybody knows of a ready-made ANSI C implementation?

hi shlomi,

do you need single writer multiple readers, or multiple/multiple? do you
need recursive locking? do you need "lock upgradablity" (by which i mean
that a thread that is already locked for read might now wish to grab the
lock for write as well (without releasing the read lock first)).

if single writer / multiple readers is enough for you, contact me off
list, i might have something for you ;)
-- 
mulix

http://www.advogato.com/person/mulix
http://www.sf.net/projects/syscalltrack



=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il