From: Florian Zumbiehl <[email protected]>
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
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to