[omniORB] omniORB, posix rwlock_t and deadlock
Duncan Grisby
dgrisby@uk.research.att.com
Tue, 12 Jun 2001 17:33:09 +0100
On Tuesday 12 June, Attila Pletyak wrote:
[...]
> Does anyone has experience with such a thing? Is there an omniORB
> specific thread synchronization tool which works like the rwlock?
> Previously I used the omni_mutex, but it was slow as in the base class
> there is only reading in the majority of the time.
omniORB doesn't hold any locks when it makes an up-call into
application code (unless you are using a single thread policy POA), so
I doubt it can be the direct cause of your deadlock.
A good thing to help track down the deadlock is to attach to the
frozen process with gdb and do a backtrace on each of the threads. If
it really is deadlocked, you'll see at least two threads blocked
attempting to acquire different resources.
On the subject of a reader-writer lock based on omnithread, look at
src/appl/omniNames/ReadersWritersLock.h. That file is licensed under
GPL, but if that causes a problem for you I'm sure you can use it as
inspiration for your own implementation :-).
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --