<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Jun 22, 2010, at 9:21 AM, Vinu Rajashekhar wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Tue, Jun 22, 2010 at 9:48 PM, Eric Norum <span dir="ltr"><<a href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
You can read and write a socket from different threads.<br>
Just don't have multiple threads trying to read at the same time or trying to write at the same time.<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div><br></div><div>Yes, what if that happens, I don't care about the data being transferred.</div><div>I just want to wakeup select using the socket, then ?</div></div></blockquote><div><br></div>Are you doing a select waiting for read data to appear?</div><div>or are you doing a select waiting for space to become ready in a write queue?</div><div><br></div><div>Do you mean you do a write on one machine and want the 'select read' to wake up on the other machine?</div><div><br></div><div>It's not clear to me what you have in mind.</div><div><br></div><div><blockquote type="cite"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
On Jun 22, 2010, at 9:03 AM, Vinu Rajashekhar wrote:<br>
<br>
> From the networking documentation, it seems that one cannot<br>
> share the same socket across threads/tasks for the same operation, like<br>
> read or write.<br>
><br>
> What is the exact problem if I use the same socket to write something<br>
> across different threads, is data corruption the only problem? More specifically,<br>
> if I have run a select call on a socket, and if I write something into the socket,<br>
> from different threads, does the select wakeup for sure ?<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> rtems-users mailing list<br>
> <a href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
> <a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br>
--<br>
Eric Norum<br>
<a href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a><br>
<br>
</div></div></blockquote></div><br>
</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div>-- <br>Eric Norum<br><a href="mailto:wenorum@lbl.gov">wenorum@lbl.gov</a></div></span>
</div>
<br></body></html>