On Friday, April 27, 2012 3:56:06 am Sebastian Huber wrote:
> Hi,
> 
> in syncache_socket() in tcp_syncache.c the global variable thread0 is used to 
> do a in6_pcbconnect() with the ucread of thread0.  Why is the thread0 used 
> here 
> and not the one of the current thread?

The current thread is generally not all that interesting in this case.  Note 
that
this is used for building a socket that will be returned by accept(), not due to
a call to connect(), so the only credential establishing this connection would
be the user on the remote machine that opened the connection.  The current 
thread
for this call is typically an interrupt thread of some sort, but it can also be
a netisr thread, or a device driver taskqueue thread, etc.  thread0 gives a 
stable
credential to use for creating accepted connections.

-- 
John Baldwin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to