[RFC 0/4] cell offloaded stdio

Kazunori Asayama asayama@sm.sony.co.jp
Mon Dec 4 06:40:00 GMT 2006


jschopp <jschopp@austin.ibm.com> wrote:
> These probably aren't ready for inclusion in the main cvs repository yet, but I would like 
> some feedback on patch number 4.  I'm also sending them out without changelogs and 
> rebasing because others are using them and they include some bugfixes.  They are very 
> functional and have gone through a decent amount of testing.

I found bugs in your offloading patches. Of course, I know that these
patches are just RFCs, but anyway, I attach a patch to fix them.


Index: newlib/newlib/libc/machine/spu/putchar.c
===================================================================
--- newlib.orig/newlib/libc/machine/spu/putchar.c
+++ newlib/newlib/libc/machine/spu/putchar.c
@@ -10,7 +10,7 @@ putchar (c)
 {
   /* c gets overwritten before return */
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &c);
+  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
 
   return c;
 }
Index: newlib/newlib/libc/machine/spu/ftell.c
===================================================================
--- newlib.orig/newlib/libc/machine/spu/ftell.c
+++ newlib/newlib/libc/machine/spu/ftell.c
@@ -12,7 +12,7 @@ _DEFUN (ftell, (fp),
 
   myfp = translate_fp(fp);
 
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_CLEARERR, &myfp);
+  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FTELL, &myfp);
 
   return *ret;
 }
Index: newlib/newlib/libc/machine/spu/remove.c
===================================================================
--- newlib.orig/newlib/libc/machine/spu/remove.c
+++ newlib/newlib/libc/machine/spu/remove.c
@@ -9,7 +9,7 @@ remove (filename)
 
   /* The return value gets written over buf
    */
-  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &filename);
+  send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REMOVE, &filename);
 
   return (int)filename;
 }



More information about the Newlib mailing list