From: Mark H. <ma...@os...> - 2004-05-19 14:59:11
|
On Tue, 2004-05-18 at 17:19, Jon Maloy wrote: > I think I have succeeded in making the port/transport level lock > handling somewhat easier to understand, without changing the > basic locking policy. > > New: > > 1: Callbacks to socket.c (dispatcher/wakeup dipatcher) are now > called with and return with the port-lock on. > > 2: Symmetry: A port or subscription is now always > locked/unlocked in the same function. These are a good idea. It makes it a lot easier to follow when you can see the scope of a lock without having to look through a bunch of called functions to find out whether a lock was released in one of them. > > 3: No dual-purpose functions to the reference manager; > ref_lock_acquire/ref_unlock_discard etc are now gone. > The port lock is still located in the corresponding reference > entry, though, and is accessed via easily comprehensible > inline functions; port_lock()/port_unlock() etc. > > 4: Better comments about what the locks protect, and what > the lock functions do. > > I will continue with a similar work on the node locks in a few days, > but I would welcome some feedback first. I've loaded it on to a couple of my systems and will try it out today. Mark. -- Mark Haverkamp <ma...@os...> |