Subject: Re: Kernel threads and TCP sockets.
To: None <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 04/09/2001 02:10:25
> Is it even theoretically possible for a kernel thread (say, one
> spawned around the same time as the pagedaemon) to construct a TCP
> socket,

Yes.  I know because I've done it (though in my case the kernel thread
was spun off significantly later, more like the end of device
autoconfig - but a thread forked early that waits should work just as
well).

> After a little thinking about this logically, I fear the answer is
> no, since network interfaces are initialized long after virtual
> memory is allocated in the kernel boot process (in fact, networking
> initialization is handled by rc, not by the kernel proper at all,
> correct?).

To some extent.  In the case I refer to above, the machine was booting
diskless, so one interface was up and running by the time mountroot
finished.  For my purposes that was enough.

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B