Re: [Pixil-devel] ask for help
[email protected] Tue, 14 Feb 2006 13:36:38 +0800
| Newsgroups | gmane.comp.web.viewml.devel |
|---|---|
| Message-ID | <OF09BAC634.9106890C-ON48257115.001D6D7B-48257115.001F2748@skyworksinc.com> |
This is a multipart message in MIME format. --===============0295302584== Content-Type: multipart/alternative; boundary="=_alternative 001F273E48257115_=" This is a multipart message in MIME format. --=_alternative 001F273E48257115_= Content-Type: text/plain; charset="US-ASCII" Hi Greg, thank you very much for your advice! i want solve it by followint way: first add IPC client fd into Nano-X select fd set, and drain out all the queued message in IPC fd each time before call Nano-X GrWaitNextEvent(...), i wish it can work fine. thanks & best regards tao "Greg Haerr" <[email protected]> 02/14/2006 12:53 PM Please respond to "Greg Haerr" <[email protected]> To <[email protected]> cc Subject Re: [Pixil-devel] ask for help Tao - Sorry my response is so slow. I do not know the PIXIL code very well, only Microwindows. I would suggest removing the write(...,0) code if is causing problems, and perhaps adding a timeout to select(), so that your IPC client calls will still work. Would this solve your problem? Regards, Greg ----- Original Message ----- From: [email protected] To: Greg Haerr Cc: [email protected] ; [email protected] Sent: Thursday, February 09, 2006 7:23 PM Subject: Re: [Pixil-devel] ask for help Hi Greg, thanks for your advice, i think the author is want following effect during ipc client wait for the reply of request, if it have queued some unsolicited packet, it want to make sock readable for ipc client, so that it can exit immediately next time when call select(...), and the packet queued will have opportunity to been processed immediately. this effect is very important for the application when it's the client of IPC & Nano-X at the same time. but after some experiment, i regretlly find it don't have the effect! i do as following step (1) run ipc server (clserver) (2) the ipc client make request to server and retrieve its reply, after that the ipc server has been blocked in select(...) (3) the ipc client directly write(sock, 0, 0), and find the ipc server don't unblock from select, (4) then the ipc client call select, it also blocked in this call or i misunderstand it. thanks & regards tao "Greg Haerr" <[email protected]> 02/09/2006 01:49 AM To <[email protected]> cc <[email protected]>, <[email protected]> Subject Re: [Pixil-devel] ask for help : i guest the side effect of wirte(sock, 0, 0) is to make this sock : readable, so than when some packet queued, it make the : sock readable, so when client use select(...) call, it will return : immedialely, not blocked forever if no new packet in, and : have chance to get packet queued, if it right? I believe that the write is to trigger any pending selects to unblock their threads/processes. Regards, Greg _______________________________________________ Pixil-devel mailing list [email protected] http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel --=_alternative 001F273E48257115_= Content-Type: text/html; charset="US-ASCII" <br><font size=2 face="sans-serif">Hi Greg,</font> <br> <br><font size=2 face="sans-serif"> thank you very much for your advice!</font> <br> <br><font size=2 face="sans-serif"> i want solve it by followint way:</font> <br><font size=2 face="sans-serif"> </font> <br><font size=2 face="sans-serif"> first add IPC client fd into Nano-X select fd set, and drain out all the queued message in IPC fd each time before call Nano-X </font> <br><font size=2 face="sans-serif"> GrWaitNextEvent(...), i wish it can work fine.</font> <br><font size=2 face="sans-serif"> </font> <br><font size=2 face="sans-serif">thanks & best regards</font> <br><font size=2 face="sans-serif">tao</font> <br> <br> <br> <br> <br> <table width=100%> <tr valign=top> <td width=40%><font size=1 face="sans-serif"><b>"Greg Haerr" <[email protected]></b> </font> <p><font size=1 face="sans-serif">02/14/2006 12:53 PM</font> <table border> <tr valign=top> <td bgcolor=white> <div align=center><font size=1 face="sans-serif">Please respond to<br> "Greg Haerr" <[email protected]></font></div></table> <br> <td width=59%> <table width=100%> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">To</font></div> <td><font size=1 face="sans-serif"><[email protected]></font> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">cc</font></div> <td> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">Subject</font></div> <td><font size=1 face="sans-serif">Re: [Pixil-devel] ask for help</font></table> <br> <table> <tr valign=top> <td> <td></table> <br></table> <br> <br> <br><font size=2 face="Arial">Tao - </font> <br><font size=2 face="Arial"> Sorry my response is so slow. I do not know the PIXIL</font> <br><font size=2 face="Arial">code very well, only Microwindows. I would suggest removing</font> <br><font size=2 face="Arial">the write(...,0) code if is causing problems, and perhaps</font> <br><font size=2 face="Arial">adding a timeout to select(), so that your IPC client calls</font> <br><font size=2 face="Arial">will still work. Would this solve your problem?</font> <br><font size=3> </font> <br><font size=2 face="Arial">Regards,</font> <br><font size=3> </font> <br><font size=2 face="Arial">Greg</font> <br><font size=3>----- Original Message ----- </font> <br><font size=3><b>From:</b> </font><a href=mailto:[email protected]><font size=3 color=blue><u>[email protected]</u></font></a><font size=3> </font> <br><font size=3><b>To:</b> </font><a href=mailto:[email protected]><font size=3 color=blue><u>Greg Haerr</u></font></a><font size=3> </font> <br><font size=3><b>Cc:</b> </font><a href="mailto:[email protected]"><font size=3 color=blue><u>[email protected]</u></font></a><font size=3> ; </font><a href="mailto:[email protected]"><font size=3 color=blue><u>[email protected]</u></font></a><font size=3> </font> <br><font size=3><b>Sent:</b> Thursday, February 09, 2006 7:23 PM</font> <br><font size=3><b>Subject:</b> Re: [Pixil-devel] ask for help</font> <br> <br><font size=2 face="sans-serif"><br> Hi Greg,</font><font size=3> <br> <br> </font><font size=2 face="sans-serif"><br> thanks for your advice, i think the author is want following effect <br> <br> during ipc client wait for the reply of request, if it have queued some</font><font size=3> </font><font size=2 face="sans-serif"><br> unsolicited packet, it want to make sock readable for ipc client, so that</font><font size=3> </font><font size=2 face="sans-serif"><br> it can exit immediately next time when call select(...), and the packet queued</font><font size=3> </font><font size=2 face="sans-serif"><br> will have opportunity to been processed immediately.</font><font size=3> <br> </font><font size=2 face="sans-serif"><br> this effect is very important for the application when it's the client of IPC & Nano-X</font><font size=3> </font><font size=2 face="sans-serif"><br> at the same time.</font><font size=3> <br> <br> </font><font size=2 face="sans-serif"><br> but after some experiment, i regretlly find it don't have the effect!</font><font size=3> <br> </font><font size=2 face="sans-serif"><br> i do as following step <br> (1) run ipc server (clserver)</font><font size=3> <br> </font><font size=2 face="sans-serif"><br> (2) the ipc client make request to server and retrieve its reply, <br> after that the ipc server has been blocked in select(...)</font><font size=3> </font><font size=2 face="sans-serif"><br> </font><font size=3> </font><font size=2 face="sans-serif"><br> (3) the ipc client directly write(sock, 0, 0), and find</font><font size=3> </font><font size=2 face="sans-serif"><br> the ipc server don't unblock from select,</font><font size=3> </font><font size=2 face="sans-serif"><br> </font><font size=3> </font><font size=2 face="sans-serif"><br> (4) then the ipc client call select, it also blocked in this</font><font size=3> </font><font size=2 face="sans-serif"><br> call <br> </font><font size=3> </font><font size=2 face="sans-serif"><br> or i misunderstand it.</font><font size=3> </font><font size=2 face="sans-serif"><br> <br> thanks & regards <br> tao</font><font size=3> <br> <br> <br> <br> </font> <table width=100%> <tr valign=top> <td width=35%><font size=1 face="sans-serif"><b>"Greg Haerr" <[email protected]></b> </font> <p><font size=1 face="sans-serif">02/09/2006 01:49 AM</font><font size=3> </font> <td width=64%> <br> <table width=100%> <tr valign=top> <td width=11%> <div align=right><font size=1 face="sans-serif">To</font></div> <td width=88%><font size=1 face="sans-serif"><[email protected]></font><font size=3> </font> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">cc</font></div> <td><font size=1 face="sans-serif"><[email protected]>, <[email protected]></font><font size=3> </font> <tr valign=top> <td> <div align=right><font size=1 face="sans-serif">Subject</font></div> <td><font size=1 face="sans-serif">Re: [Pixil-devel] ask for help</font></table> <br> <br> <table width=100%> <tr valign=top> <td width=50%> <td width=50%></table> <br></table> <br><font size=3><br> <br> </font><font size=2><tt><br> : i guest the side effect of wirte(sock, 0, 0) is to make this sock <br> : readable, so than when some packet queued, it make the <br> : sock readable, so when client use select(...) call, it will return <br> : immedialely, not blocked forever if no new packet in, and <br> : have chance to get packet queued, if it right? <br> <br> I believe that the write is to trigger any pending selects<br> to unblock their threads/processes. <br> <br> Regards,<br> <br> Greg<br> <br> </tt></font><font size=3><br> </font> <p> <hr> <p><font size=3>_______________________________________________<br> Pixil-devel mailing list<br> [email protected]<br> http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel</font> <p> --=_alternative 001F273E48257115_=-- --===============0295302584== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Pixil-devel mailing list [email protected] http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel --===============0295302584==--