On Wed, 24 Apr 2002 08:57:41 -0400,
Bosko Milekic <bmilekic@unixdaemons.com> said:
bmilekic> I've literally just had time to glance at this so far, but can you, if
bmilekic> you don't mind, please just briefly explain what BSD/OS does with
bmilekic> sockbuf locking (do they use the same lock, or...?)
In BSD/OS, each of the sockbufs in a socket has a mutex. It protects
the data in the sockbuf. In addition, the mutex of the receive
sockbuf also protects the whole data of the socket as well. BSD/OS
seems to have no global locks to protect the relation between sockets.
One thing I am not sure is the lock requirement upon waking up a
process tsleeping for socket operation. In BSD/OS, some parts wake
up processes with a socket locked, while the other parts not. I am
going to make all of the functions calling sowakeup() to lock a socket
first.
--
Seigo Tanimura <tanimura@r.dl.itc.u-tokyo.ac.jp> <tanimura@FreeBSD.org>
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message