chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts


From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts
Date: 17 Mar 2013 15:18:49 +0100

I'm not sure either.

Just I'm currently suffering from tcp-connect issues I have
not yet been able to track down.  At one hand it seems
to block the whole threading system to the point of
unusable while tcp-connect claims that the connection
timed out.  Now this again was working code before.
Will have to dig deeper.

(So far the disable-interrups and errno patch has not been
applied here.  Instead I found that ##net#select-write
could err out and require a restart.  The attached
patch tries to handle this case.  But beware: it's just
to point smth out; not ready to go IMHO - since the whole
thing does'nt really work.)



On Mar 16 2013, Felix wrote:

From: Florian Zumbiehl <address@hidden>
Subject: [Chicken-hackers] [PATCH 1/2] tcp: disable interrupts
Date: Sat, 16 Mar 2013 17:56:41 +0100

Add (declare (disable-interrupts)) to tcp so that errno doesn't get changed at inappropriate points during execution. ---

I don't really have a clue whether this is the correct way to do it, but
the code that was breaking before is not breaking anymore with this patch
applied ...

I'm not 100% sure about this. Send/receive of large amounts of data
will not be interrupted by the scheduler with timer-interrupts
disabled (the code will invoke the scheduler manually, but only if the
read/write operations fail due to blocking or interrupted system
calls). On the other hand adding the declarations will make the
behaviour certainly more deterministic and might avoid hidden race
conditions.


cheers,
felix

_______________________________________________
Chicken-hackers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/chicken-hacke

Attachment: tcp.patch
Description: tcp.patch


reply via email to

[Prev in Thread] Current Thread [Next in Thread]