From owner-freebsd-net Mon Oct 9 7:44:35 2000 Delivered-To: freebsd-net@freebsd.org Received: from falla.videotron.net (falla.videotron.net [205.151.222.106]) by hub.freebsd.org (Postfix) with ESMTP id 5966C37B502 for ; Mon, 9 Oct 2000 07:44:28 -0700 (PDT) Received: from modemcable213.3-201-24.mtl.mc.videotron.ca ([24.201.3.213]) by falla.videotron.net (Sun Internet Mail Server sims.3.5.1999.12.14.10.29.p8) with ESMTP id <0G2600JDS3M1OP@falla.videotron.net> for freebsd-net@FreeBSD.ORG; Mon, 9 Oct 2000 10:44:26 -0400 (EDT) Date: Mon, 09 Oct 2000 10:48:27 -0400 (EDT) From: Bosko Milekic Subject: Re: Locking a SOCKET In-reply-to: X-Sender: bmilekic@jehovah.technokratis.com To: Christopher Harrer Cc: Freebsd-Net Message-id: MIME-version: 1.0 Content-type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Mon, 9 Oct 2000, Christopher Harrer wrote: > Hello All, > > Sorry if this is a simplistic question. I am writing a SOCKET "filter" > driver. Can someone please point me to documentation that explains the > locking methods in FreeBSD? > > Thanks! > > Chris Hi Chris, The "locking" methods for sockets are still "in-development." :-) Basically, Alfred is working on this, the last time I checked. I'm hoping that he will post in follow-up to your Email, but if not, you can always peek/poke/etc at his web space: http://people.freebsd.org/~alfred/mpsafe/ There is a file in there called "stackjournal.txt" which, amongst other things, discusses some issues pertaining to locking the socket structure. This is work-in-progress, and it's taking place in -CURRENT. If you are running -STABLE, the code there takes care of structure consistency by masking out the soft net interrupt, with splnet(). This takes care of sockets, and socket buffers. If you write something using these semantics, and want to keep supporting it, be prepared to do some modifying eventually, when the locking stuff is finalized and committed. Cheers, Bosko Milekic bmilekic@technokratis.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message