This is the mail archive of the
mailing list for the newlib project.
Re: [RFC 0/4] cell offloaded stdio
- From: jschopp <jschopp at austin dot ibm dot com>
- To: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Fri, 20 Oct 2006 13:38:48 -0500
- Subject: Re: [RFC 0/4] cell offloaded stdio
- References: <4536AAE7.firstname.lastname@example.org> <4537EF28.email@example.com>
You mean like sys/stdio.h which is already included?
I need to think this through some more. The goal is to get FILE* to be an int, and to
have stdout, stderr, and stdin all initialized with 1, 2, & 3. This instead of FILE*
being a pointer to an __sFILE and stdout, stderr, and stdin all being pointers to real
I would have advised just adding a special spe_send function for I/O
which passes the FILE pointer in and does the magic on the other side.
This saves you having to edit each and every file if you decide to
change the mechanism.
I can't do that, as nice as it would be if I could. The interface is already architected
and can't be changed. Besides which the real FILE pointer is in a totally different
address space on the PowerPC part of the chip (in glibc).
Remind me again why you are overriding all user-visible I/O functions
and not simply the underlying functions used internally by newlib (e.g.
__vfprintf_r which is used by the entire printf family of functions)?
For example, if a non stdio C function in newlib needs to do some I/O
internally for its purposes, it will call _xxxx_r routines which you
I did the user visible functions to save a branch (which are quite costly on the cell
spe), because the user visible set maps better than the newlib internal set, and because I
thought that the stdio C functions were the only users of the _xxx_r stdio functions.
If there are other users of the _xxx_r routines still existing I may need to override
those referenced _xxx_r routines as well. Right now everything I've tested works fine.