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: [RFC 0/4] cell offloaded stdio


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 structures.


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 haven't overridden.

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.

-Joel


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