This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [libfortran] Patch for pr 15328


On Friday 14 May 2004 20:34, Janne Blomqvist wrote:
> Patch for pr 15328:

2004-05-16  Janne Blomqvist  <jblomqvi@cc.hut.fi>

	* io/io.h (flush): Add prototype.
	* io/transfer.c (finalize_transfer): Flush partial records.
	* io/unix.c (flush): New function.

Applied, thanks.

I can't find anything in the standard that says the data must be written to 
the device before execution continues. It also specifies that a file may not 
be connected to more than one unit. My interpretation is that this is to 
allow the processor freedom to cache/defer writes to improve performance.

Ideally I'd like to always flush when we think it might be useful (eg. when 
connected to a terminal), but not when connected to a file. Calling flush 
after every write is likely to kill performance.

Even with your patch we still assume the OS does something sensible when 
ADVANCE=yes. However it's better than what we currently have.

Also a few points about submitting patches:
- Please include a ChangeLog entry (as plain text in the body of the email).
- We will need a copyright assignment (I know I'm repeating myself, but it's 
important :)
- You might find it easier to use "cvs diff -u" (or -c) to generate your 
patch. Either that or "diff -ru" against a clean tree.
- The ususal issues with tabs vs spaces. GCC convention is to use hard tabs 
width 8. Care needs to be taken to preserve these when pasting a patch into 
an email, otherwise it won't apply cleanly..

Paul


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]