You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== ChangeSet@1.1414.4.17, 2003-11-09 07:14:06-02:00, acme@conectiva.com.br o NET: introduce sk_wait_event Consolidate code. With this we can get the good practices found in the more stable protocols and make it easy for all the existing protocols to use it as well as saving several details for network protocol hackers. Probably I'll introduce some variations in the near future for common wait_for_ operations, removing several open coded implementations that use things like checking if the timeout expired, if the socket has been shutdown, if there are pending signals, etc. sock.h | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -Nru a/include/net/sock.h b/include/net/sock.h --- a/include/net/sock.h Sat Nov 15 17:03:36 2003 +++ b/include/net/sock.h Sat Nov 15 17:03:36 2003 @@ -395,6 +395,16 @@ extern void sk_flush_backlog(struct sock *sk); +#define sk_wait_event(__sk, __timeo, __condition) \ +({ int rc; \ + release_sock(__sk); \ + rc = __condition; \ + if (!rc) \ + *(__timeo) = schedule_timeout(*(__timeo)); \ + lock_sock(__sk); \ + rc; \ +}) + /* IP protocol blocks we attach to sockets. * socket layer -> transport layer interface * transport -> network interface is defined by struct inet_proto =================================================================== This BitKeeper patch contains the following changesets: 1.1414.4.17 ## Wrapped with gzip_uu ## M'XL( (AXMC\ ^U676_;-A1]%G_%'?(P>XME4A^6[<)#MZS8B@U;D*W82P"# MIFXLPI)HD)3=8.Y_[Q63.$F7+EC1EP&E]6#K'AX>GOL!G\ ;AW8>2=4@.X&? MC?/S2)D6E=<[&2O3Q"M+@0MC*#"N3(/C'CM>;9)QBWZ4Q)-8,$*<2Z\JV*%U M\TC$Z?&-O][B/+IX]=.;7[^_8&RQ@+-*MFO\ STL%LP;NY-UZ5Y*7]6FC;V5 MK6O0A[,/1^@AX3RA3RZ*E.>3@YCPK#@H40HA,X$E3[+I)&.]M)%; 2/. M?H#/>XTSIL# ;Z_^G(-NO35EIQ#<9KF7VB]QAZTG #UGIG6FUJ7T",J4&,-? MVI/EE7:PIU>RA379["N$M3$E;*TD]0H=7)FN+8D\Q!ICD=B6[-BNYX#:^_)FD/K*6RAIVT6GI- MEM[YTJ*T<-7YSF)02ZEL3 LA"_1[V6=I2W<*FT[!8F,>W92";<@+.=UL:VPH M<;@_+L:XY.R[ M9PI?MZKN2NPGQ;C7'%'29JETS!E_HE]?MQ\JMR/S)U_DYNGLSP_9$7"BS" LNGCR9/.\^*9R<._ MC)XOH^?_-WIN6O1W&-E]>&B6G#_1K9\PD5ZGLP($9R#VT"%M<>1SV=6XO/5WS=DE_?_N4+F 37-