[En-Nut-Discussion] fflush on input
    Pavel Chromy 
    chromy at asix.cz
       
    Fri Feb 27 09:34:58 CET 2004
    
    
  
> I use fflush to ensure the output goes to destination but I wouldnt want 
> to lose incoming data already queued just because the output thread 
> wanted to hurry up....  How should I be forcing output buffer to flush 
> without affecting incoming stream data?
> Message: 4
> Date: Thu, 11 Dec 2003 15:08:28 +0100
> From: Harald Kipp <harald.kipp at egnite.de>
> Subject: Re: [En-Nut-Discussion] fflush newbie question
> To: togrady at comtech.uk.com,	"Ethernut User Chat (English)"
> 	<en-nut-discussion at egnite.de>
> Message-ID: <5.1.1.6.0.20031211150609.02d48d18 at egnite.de>
> Content-Type: text/plain; charset="us-ascii"; format=flowed
> 
> fflush forces data output only. It does not flush the input
> buffer, which is considered an error and will be changed.
> 
> fflush shall force output and discard the input.
I bit outdated reply:
I think this that discarding output in fflush is a bad idea
as Brett pointed out.
There might be a separate function discarding input, which is usually called
purge (probably fpurge?).
Pavel
    
    
More information about the En-Nut-Discussion
mailing list