This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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: [PATCH 2/3] SPU stdio: FILE related stuffs


Patrick Mansfield <patmans@us.ibm.com> wrote:
> Where is the s->cleanup called? On exit?

Yes.

> And why call fclose() in the cleanup? So main memory/PPE side buffers are
> flushed?
> 
> Won't that happen by default in the PPE executable? I can't figure out
> where/how glibc implements it ... but it must be flushing those buffers.

As you say, PPE's libc will perform such cleanups, but such things
will be done at the end of the PPE process. So if we don't perform
cleanups at the end of each SPE execution, the files which are not
closed explicitly by SPE, are left open until the corresponding
process exits.

In general, because multiple SPE contexts can be run in a PPE process
and/or because a PPE process may not exit as soon as an SPE exits, we
should do cleanups for each SPE execution.

--
(ASAYAMA Kazunori
  (asayama@sm.sony.co.jp))
t


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