Re: why use INP_WLOCK instead of INP_RLOCK

2011-03-25 Thread Robert N. M. Watson
On 25 Mar 2011, at 21:01, John Baldwin wrote: > On Tuesday, February 01, 2011 12:54:33 am Jim wrote: >> I am not sure if anybody has asked it before. I could not find answer by >> doing rough search on Internet, if it is duplicate question, sorry in >> advance. >> >> My question is that, for get

Re: why use INP_WLOCK instead of INP_RLOCK

2011-03-25 Thread John Baldwin
On Tuesday, February 01, 2011 12:54:33 am Jim wrote: > Hi All, > > I am not sure if anybody has asked it before. I could not find answer by > doing rough search on Internet, if it is duplicate question, sorry in > advance. > > My question is that, for getting socket options in tcp_ctloutput() in

why use INP_WLOCK instead of INP_RLOCK

2011-01-31 Thread Jim
Hi All, I am not sure if anybody has asked it before. I could not find answer by doing rough search on Internet, if it is duplicate question, sorry in advance. My question is that, for getting socket options in tcp_ctloutput() in tcp_usrreq.c, why do we need to do lock with INP_WLOCK(inp) as sett