Date: Thu, 15 Dec 2005 22:52:31 +0800 From: prime <guomingyan@gmail.com> To: freebsd-hackers@freebsd.org Subject: Use turnstile to implement sx_lock Message-ID: <1fa17f810512150652h5da6a6a5g3347f841a614689e@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
hi hackers, I want to use turnstile to implement sx_lock( or read/write lock),but find that there is a big obstacle, ONE sx_lock needs TWO queues to put waiters on,one for readers and the other one for writers,but ONE turnstile can only supply ONE queue,and ONE sx_lock can only get ONE turnstile. I read opensolaris' rw_lock implementation and find that its turnstile has TWO queues which is different from FreeBSD's turnstile. Are there any good ideas to bypass the obstacle? Thanks very much. -- Three passions, simple but overwhelmingly strong, have governed my life: the longing for love, the search for knowledge, and unbearable pity for the suffering of mankind. ---------Bertrand Russell
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1fa17f810512150652h5da6a6a5g3347f841a614689e>