On 2011-02-08 16:52, Anders Blomdell wrote:
> On 02/08/2011 04:03 PM, Jan Kiszka wrote:
>> On 2011-02-08 16:00, Anders Blomdell wrote:
>>>>> The only other reason this could be "oops"ing is that I am reading and
>>>>> writing on the same socket and your example does not.
>>>>
>>>> We do in a less trivial application in the field. No complains from my
>>>> colleagues so far.
>>> With raw sockets I have problems reading and writing from/to the same
>>> socket
>>> when done from different threads (on my todo list to track this down
>>> some time
>>> in the future), might this be the same problem?
>>
>> You mean one thread reads and another writes? Or both mixed? What kind of
>> problems?
> At least with one thread reading and one writing.
> Some errno which I cant exctly recall (9x, something, might have been
> EADDRINUSE, but I'm not sure).

98 == EADDRINUSE. But that's only thrown by UDP and TCP, not AF_PACKET.

> My workaround was to read from the socket
> with a timeout, that way I was able to do everything in one thread (yes,
> I know it's not a long term solution).

Maybe there is same race and some missing locking. I would be interested
to hear more details / see a test case when you find some time.

Thanks,
Jan

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to