aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2007-04-04 21:03:13 +0000
committerJeff Johnston <jjohnstn@redhat.com>2007-04-04 21:03:13 +0000
commit748c1917671f87b17b245a884de0928b48054c85 (patch)
tree4eeb0d3bb86fab2ff025eae4291753c4856cdd0f /newlib/libc
parentc6e05f0d080e0d5c7e1458b41f3211feace794ef (diff)
downloadnewlib-748c1917671f87b17b245a884de0928b48054c85.zip
newlib-748c1917671f87b17b245a884de0928b48054c85.tar.gz
newlib-748c1917671f87b17b245a884de0928b48054c85.tar.bz2
2007-04-04 Patrick Mansfield <patmans@us.ibm.com>
* libc/machine/spu/sys/syscall.h: New file for __send_to_ppe prototype. * libc/machine/spu/c99ppe.h: Remove static version of send_to_ppe. * libc/machine/spu/clearerr.c: Call __send_to_ppe vs send_to_ppe. * libc/machine/spu/fclose.c: Ditto. * libc/machine/spu/feof.c: Ditto. * libc/machine/spu/ferror.c: Ditto. * libc/machine/spu/fflush.c: Ditto. * libc/machine/spu/fgetc.c: Ditto. * libc/machine/spu/fgetpos.c: Ditto. * libc/machine/spu/fgets.c: Ditto. * libc/machine/spu/fileno.c: Ditto. * libc/machine/spu/fopen.c: Ditto. * libc/machine/spu/fprintf.c: Ditto. * libc/machine/spu/fputc.c: Ditto. * libc/machine/spu/fputs.c: Ditto. * libc/machine/spu/fread.c: Ditto. * libc/machine/spu/freopen.c: Ditto. * libc/machine/spu/fscanf.c: Ditto. * libc/machine/spu/fseek.c: Ditto. * libc/machine/spu/fsetpos.c: Ditto. * libc/machine/spu/ftell.c: Ditto. * libc/machine/spu/fwrite.c: Ditto. * libc/machine/spu/getc.c: Ditto. * libc/machine/spu/getchar.c: Ditto. * libc/machine/spu/gets.c: Ditto. * libc/machine/spu/perror.c: Ditto. * libc/machine/spu/printf.c: Ditto. * libc/machine/spu/putc.c: Ditto. * libc/machine/spu/putchar.c: Ditto. * libc/machine/spu/puts.c: Ditto. * libc/machine/spu/remove.c: Ditto. * libc/machine/spu/rename.c: Ditto. * libc/machine/spu/rewind.c: Ditto. * libc/machine/spu/scanf.c: Ditto. * libc/machine/spu/setbuf.c: Ditto. * libc/machine/spu/setvbuf.c: Ditto. * libc/machine/spu/snprintf.c: Ditto. * libc/machine/spu/sprintf.c: Ditto. * libc/machine/spu/sscanf.c: Ditto. * libc/machine/spu/tmpfile.c: Ditto. * libc/machine/spu/tmpnam.c: Ditto. * libc/machine/spu/ungetc.c: Ditto. * libc/machine/spu/vfprintf.c: Ditto. * libc/machine/spu/vfscanf.c: Ditto. * libc/machine/spu/vprintf.c: Ditto. * libc/machine/spu/vscanf.c: Ditto. * libc/machine/spu/vsnprintf.c: Ditto. * libc/machine/spu/vsprintf.c: Ditto. * libc/machine/spu/vsscanf.c: Ditto.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/machine/spu/c99ppe.h22
-rw-r--r--newlib/libc/machine/spu/clearerr.c2
-rw-r--r--newlib/libc/machine/spu/fclose.c2
-rw-r--r--newlib/libc/machine/spu/feof.c2
-rw-r--r--newlib/libc/machine/spu/ferror.c2
-rw-r--r--newlib/libc/machine/spu/fflush.c2
-rw-r--r--newlib/libc/machine/spu/fgetc.c2
-rw-r--r--newlib/libc/machine/spu/fgetpos.c2
-rw-r--r--newlib/libc/machine/spu/fgets.c2
-rw-r--r--newlib/libc/machine/spu/fileno.c2
-rw-r--r--newlib/libc/machine/spu/fopen.c2
-rw-r--r--newlib/libc/machine/spu/fprintf.c2
-rw-r--r--newlib/libc/machine/spu/fputc.c2
-rw-r--r--newlib/libc/machine/spu/fputs.c2
-rw-r--r--newlib/libc/machine/spu/fread.c2
-rw-r--r--newlib/libc/machine/spu/freopen.c2
-rw-r--r--newlib/libc/machine/spu/fscanf.c2
-rw-r--r--newlib/libc/machine/spu/fseek.c2
-rw-r--r--newlib/libc/machine/spu/fsetpos.c2
-rw-r--r--newlib/libc/machine/spu/ftell.c2
-rw-r--r--newlib/libc/machine/spu/fwrite.c2
-rw-r--r--newlib/libc/machine/spu/getc.c2
-rw-r--r--newlib/libc/machine/spu/getchar.c2
-rw-r--r--newlib/libc/machine/spu/gets.c2
-rw-r--r--newlib/libc/machine/spu/perror.c2
-rw-r--r--newlib/libc/machine/spu/printf.c2
-rw-r--r--newlib/libc/machine/spu/putc.c2
-rw-r--r--newlib/libc/machine/spu/putchar.c2
-rw-r--r--newlib/libc/machine/spu/puts.c2
-rw-r--r--newlib/libc/machine/spu/remove.c2
-rw-r--r--newlib/libc/machine/spu/rename.c2
-rw-r--r--newlib/libc/machine/spu/rewind.c2
-rw-r--r--newlib/libc/machine/spu/scanf.c2
-rw-r--r--newlib/libc/machine/spu/setbuf.c2
-rw-r--r--newlib/libc/machine/spu/setvbuf.c2
-rw-r--r--newlib/libc/machine/spu/snprintf.c2
-rw-r--r--newlib/libc/machine/spu/sprintf.c2
-rw-r--r--newlib/libc/machine/spu/sscanf.c2
-rw-r--r--newlib/libc/machine/spu/sys/syscall.h4
-rw-r--r--newlib/libc/machine/spu/tmpfile.c2
-rw-r--r--newlib/libc/machine/spu/tmpnam.c2
-rw-r--r--newlib/libc/machine/spu/ungetc.c2
-rw-r--r--newlib/libc/machine/spu/vfprintf.c2
-rw-r--r--newlib/libc/machine/spu/vfscanf.c2
-rw-r--r--newlib/libc/machine/spu/vprintf.c2
-rw-r--r--newlib/libc/machine/spu/vscanf.c2
-rw-r--r--newlib/libc/machine/spu/vsnprintf.c2
-rw-r--r--newlib/libc/machine/spu/vsprintf.c2
-rw-r--r--newlib/libc/machine/spu/vsscanf.c2
49 files changed, 52 insertions, 68 deletions
diff --git a/newlib/libc/machine/spu/c99ppe.h b/newlib/libc/machine/spu/c99ppe.h
index 6d2dab6..da5d03c 100644
--- a/newlib/libc/machine/spu/c99ppe.h
+++ b/newlib/libc/machine/spu/c99ppe.h
@@ -31,6 +31,7 @@ Author: Joel Schopp <jschopp@austin.ibm.com>
*/
#include <errno.h>
+#include <sys/syscall.h>
#define SPE_C99_SIGNALCODE 0x2100
@@ -93,27 +94,6 @@ struct spe_reg128{
unsigned int slot[4];
};
-static void
-send_to_ppe(int signalcode, int opcode, void *data)
-{
-
- unsigned int combined = ( ( opcode<<24 )&0xff000000 ) | ( ( unsigned int )data & 0x00ffffff );
- struct spe_reg128* ret = data;
-
- __vector unsigned int stopfunc = {
- signalcode, /* stop 0x210x*/
- (unsigned int) combined,
- 0x4020007f, /* nop */
- 0x35000000 /* bi $0 */
- };
-
- void (*f) (void) = (void *) &stopfunc;
- asm ("sync":::"memory");
- f();
- errno = ret->slot[3];
- return;
-}
-
void _EXFUN(__sinit,(struct _reent *));
FILE *_EXFUN(__sfp,(struct _reent *));
#define __sfp_free(fp) ( (fp)->_fp = 0 )
diff --git a/newlib/libc/machine/spu/clearerr.c b/newlib/libc/machine/spu/clearerr.c
index 57b9952..b4034f8 100644
--- a/newlib/libc/machine/spu/clearerr.c
+++ b/newlib/libc/machine/spu/clearerr.c
@@ -47,7 +47,7 @@ _DEFUN (clearerr, (fp),
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_CLEARERR, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_CLEARERR, &ret);
return;
}
diff --git a/newlib/libc/machine/spu/fclose.c b/newlib/libc/machine/spu/fclose.c
index cc61f62..bbf4c60 100644
--- a/newlib/libc/machine/spu/fclose.c
+++ b/newlib/libc/machine/spu/fclose.c
@@ -46,7 +46,7 @@ _DEFUN (fclose, (fp),
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FCLOSE, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FCLOSE, &ret);
__sfp_free(fp);
diff --git a/newlib/libc/machine/spu/feof.c b/newlib/libc/machine/spu/feof.c
index fe77224..521dbe1 100644
--- a/newlib/libc/machine/spu/feof.c
+++ b/newlib/libc/machine/spu/feof.c
@@ -46,7 +46,7 @@ _DEFUN (feof, (fp),
result = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FEOF, &result);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FEOF, &result);
return result;
diff --git a/newlib/libc/machine/spu/ferror.c b/newlib/libc/machine/spu/ferror.c
index 5416f5c..b1a48f4 100644
--- a/newlib/libc/machine/spu/ferror.c
+++ b/newlib/libc/machine/spu/ferror.c
@@ -46,7 +46,7 @@ _DEFUN (ferror, (fp),
result = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FERROR, &result);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FERROR, &result);
return result;
diff --git a/newlib/libc/machine/spu/fflush.c b/newlib/libc/machine/spu/fflush.c
index f14f59d..ea81e06 100644
--- a/newlib/libc/machine/spu/fflush.c
+++ b/newlib/libc/machine/spu/fflush.c
@@ -45,7 +45,7 @@ _DEFUN (fflush, (fp),
result = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FFLUSH, &result);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FFLUSH, &result);
return result;
diff --git a/newlib/libc/machine/spu/fgetc.c b/newlib/libc/machine/spu/fgetc.c
index 73b4aa2..103b4ff 100644
--- a/newlib/libc/machine/spu/fgetc.c
+++ b/newlib/libc/machine/spu/fgetc.c
@@ -46,7 +46,7 @@ _DEFUN (fgetc, (fp),
result = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETC, &result);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETC, &result);
return result;
}
diff --git a/newlib/libc/machine/spu/fgetpos.c b/newlib/libc/machine/spu/fgetpos.c
index 1768f07..09c435a 100644
--- a/newlib/libc/machine/spu/fgetpos.c
+++ b/newlib/libc/machine/spu/fgetpos.c
@@ -58,7 +58,7 @@ _DEFUN (fgetpos, (fp, pos),
arg.fp = fp->_fp;
arg.pos = pos;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETPOS, &arg);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETPOS, &arg);
return *result;
diff --git a/newlib/libc/machine/spu/fgets.c b/newlib/libc/machine/spu/fgets.c
index 01e32a5..da6fbaf 100644
--- a/newlib/libc/machine/spu/fgets.c
+++ b/newlib/libc/machine/spu/fgets.c
@@ -61,7 +61,7 @@ _DEFUN (fgets, (buf, n, fp),
args.fp = fp->_fp;
ret = (char**) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETS, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FGETS, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/fileno.c b/newlib/libc/machine/spu/fileno.c
index 9d850fe..36809e4 100644
--- a/newlib/libc/machine/spu/fileno.c
+++ b/newlib/libc/machine/spu/fileno.c
@@ -47,7 +47,7 @@ _DEFUN (fileno, (fp),
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FILENO, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FILENO, &ret);
return ret;
}
diff --git a/newlib/libc/machine/spu/fopen.c b/newlib/libc/machine/spu/fopen.c
index 33cdbca..1a471ca 100644
--- a/newlib/libc/machine/spu/fopen.c
+++ b/newlib/libc/machine/spu/fopen.c
@@ -65,7 +65,7 @@ _DEFUN (fopen, (file, mode),
args.mode = mode;
ret = (int *) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FOPEN, &args);
if (*ret) {
fp->_fp = *ret;
diff --git a/newlib/libc/machine/spu/fprintf.c b/newlib/libc/machine/spu/fprintf.c
index 39e012a..0fe3083 100644
--- a/newlib/libc/machine/spu/fprintf.c
+++ b/newlib/libc/machine/spu/fprintf.c
@@ -75,7 +75,7 @@ fprintf(FILE * fp, _CONST char *fmt,...)
va_start (args.ap);
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/fputc.c b/newlib/libc/machine/spu/fputc.c
index 71126c6..9d890d0 100644
--- a/newlib/libc/machine/spu/fputc.c
+++ b/newlib/libc/machine/spu/fputc.c
@@ -59,7 +59,7 @@ fputc (c, fp)
args.fp = fp->_fp;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTC, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTC, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/fputs.c b/newlib/libc/machine/spu/fputs.c
index 7fea082..d85e828 100644
--- a/newlib/libc/machine/spu/fputs.c
+++ b/newlib/libc/machine/spu/fputs.c
@@ -59,7 +59,7 @@ _DEFUN (fputs, (s, fp),
args.fp = fp->_fp;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTS, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FPUTS, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/fread.c b/newlib/libc/machine/spu/fread.c
index 6ff9bd6..840449d 100644
--- a/newlib/libc/machine/spu/fread.c
+++ b/newlib/libc/machine/spu/fread.c
@@ -66,7 +66,7 @@ _DEFUN (fread, (buf, size, count, fp),
args.fp = fp->_fp;
ret = (size_t*) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREAD, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREAD, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/freopen.c b/newlib/libc/machine/spu/freopen.c
index 57fbbbd..12839e8 100644
--- a/newlib/libc/machine/spu/freopen.c
+++ b/newlib/libc/machine/spu/freopen.c
@@ -62,7 +62,7 @@ _DEFUN (freopen, (file, mode, fp),
args.fp = fp->_fp;
ret = (int *) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREOPEN, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FREOPEN, &args);
if (*ret) {
fp->_fp = *ret;
diff --git a/newlib/libc/machine/spu/fscanf.c b/newlib/libc/machine/spu/fscanf.c
index 52b8a44..b97f413 100644
--- a/newlib/libc/machine/spu/fscanf.c
+++ b/newlib/libc/machine/spu/fscanf.c
@@ -74,7 +74,7 @@ fscanf(FILE *fp, _CONST char *fmt, ...)
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/fseek.c b/newlib/libc/machine/spu/fseek.c
index 14b175c..50d2116 100644
--- a/newlib/libc/machine/spu/fseek.c
+++ b/newlib/libc/machine/spu/fseek.c
@@ -62,7 +62,7 @@ _DEFUN (fseek, (fp, offset, whence),
args.whence = whence;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSEEK, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSEEK, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/fsetpos.c b/newlib/libc/machine/spu/fsetpos.c
index 6627c33..6bd4236 100644
--- a/newlib/libc/machine/spu/fsetpos.c
+++ b/newlib/libc/machine/spu/fsetpos.c
@@ -58,7 +58,7 @@ _DEFUN (fsetpos, (iop, pos),
args.pos = pos;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSETPOS, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FSETPOS, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/ftell.c b/newlib/libc/machine/spu/ftell.c
index b633aec..66df462 100644
--- a/newlib/libc/machine/spu/ftell.c
+++ b/newlib/libc/machine/spu/ftell.c
@@ -47,7 +47,7 @@ _DEFUN (ftell, (fp),
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FTELL, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FTELL, &ret);
return ret;
}
diff --git a/newlib/libc/machine/spu/fwrite.c b/newlib/libc/machine/spu/fwrite.c
index 9c18d07..5cb45e0 100644
--- a/newlib/libc/machine/spu/fwrite.c
+++ b/newlib/libc/machine/spu/fwrite.c
@@ -66,7 +66,7 @@ _DEFUN (fwrite, (buf, size, count, fp),
args.fp = fp->_fp;
ret = (size_t*) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FWRITE, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_FWRITE, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/getc.c b/newlib/libc/machine/spu/getc.c
index df66709..6787990 100644
--- a/newlib/libc/machine/spu/getc.c
+++ b/newlib/libc/machine/spu/getc.c
@@ -49,7 +49,7 @@ getc (fp)
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETC, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETC, &ret);
return ret;
}
diff --git a/newlib/libc/machine/spu/getchar.c b/newlib/libc/machine/spu/getchar.c
index 4667792..eb105e5 100644
--- a/newlib/libc/machine/spu/getchar.c
+++ b/newlib/libc/machine/spu/getchar.c
@@ -45,7 +45,7 @@ getchar ()
CHECK_STD_INIT(_REENT);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETCHAR, &ret);
return ret;
}
diff --git a/newlib/libc/machine/spu/gets.c b/newlib/libc/machine/spu/gets.c
index 4917d72..a46ab6a 100644
--- a/newlib/libc/machine/spu/gets.c
+++ b/newlib/libc/machine/spu/gets.c
@@ -44,7 +44,7 @@ gets (buf)
/* The return value gets written over buf
*/
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &buf);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_GETS, &buf);
return buf;
}
diff --git a/newlib/libc/machine/spu/perror.c b/newlib/libc/machine/spu/perror.c
index 28598c8..63e7fe8 100644
--- a/newlib/libc/machine/spu/perror.c
+++ b/newlib/libc/machine/spu/perror.c
@@ -11,7 +11,7 @@ _DEFUN (perror, (s),
{
CHECK_STD_INIT(_REENT);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &s);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PERROR, &s);
return;
}
diff --git a/newlib/libc/machine/spu/printf.c b/newlib/libc/machine/spu/printf.c
index 898e8e8..c5a2924 100644
--- a/newlib/libc/machine/spu/printf.c
+++ b/newlib/libc/machine/spu/printf.c
@@ -49,7 +49,7 @@ printf (fmt, va_alist)
va_start (args.ap);
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/putc.c b/newlib/libc/machine/spu/putc.c
index 3dbf873..239bf2f 100644
--- a/newlib/libc/machine/spu/putc.c
+++ b/newlib/libc/machine/spu/putc.c
@@ -59,7 +59,7 @@ putc (c, fp)
args.fp = fp->_fp;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTC, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTC, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/putchar.c b/newlib/libc/machine/spu/putchar.c
index 9751879..5cf9ed4 100644
--- a/newlib/libc/machine/spu/putchar.c
+++ b/newlib/libc/machine/spu/putchar.c
@@ -14,7 +14,7 @@ putchar (c)
/* c gets overwritten before return */
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTCHAR, &c);
return c;
}
diff --git a/newlib/libc/machine/spu/puts.c b/newlib/libc/machine/spu/puts.c
index e8e2f8b..b5ed3d2 100644
--- a/newlib/libc/machine/spu/puts.c
+++ b/newlib/libc/machine/spu/puts.c
@@ -12,7 +12,7 @@ _DEFUN (puts, (s),
/* The return value gets written over s
*/
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTS, &s);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_PUTS, &s);
return (int)s;
}
diff --git a/newlib/libc/machine/spu/remove.c b/newlib/libc/machine/spu/remove.c
index b7027ca..56b0886 100644
--- a/newlib/libc/machine/spu/remove.c
+++ b/newlib/libc/machine/spu/remove.c
@@ -41,7 +41,7 @@ remove (filename)
/* The return value gets written over buf
*/
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REMOVE, &filename);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REMOVE, &filename);
return (int)filename;
}
diff --git a/newlib/libc/machine/spu/rename.c b/newlib/libc/machine/spu/rename.c
index 7b9806c..0117c56 100644
--- a/newlib/libc/machine/spu/rename.c
+++ b/newlib/libc/machine/spu/rename.c
@@ -54,7 +54,7 @@ rename (old, new)
args.new = new;
ret = (int*) &args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_RENAME, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_RENAME, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/rewind.c b/newlib/libc/machine/spu/rewind.c
index cdeb41e..8d1a0a9 100644
--- a/newlib/libc/machine/spu/rewind.c
+++ b/newlib/libc/machine/spu/rewind.c
@@ -46,7 +46,7 @@ _DEFUN (rewind, (fp),
ret = fp->_fp;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REWIND, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_REWIND, &ret);
return;
}
diff --git a/newlib/libc/machine/spu/scanf.c b/newlib/libc/machine/spu/scanf.c
index a5f2298..76c47ff 100644
--- a/newlib/libc/machine/spu/scanf.c
+++ b/newlib/libc/machine/spu/scanf.c
@@ -71,7 +71,7 @@ scanf(_CONST char *fmt, ...)
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/setbuf.c b/newlib/libc/machine/spu/setbuf.c
index d2ffebe..5555681 100644
--- a/newlib/libc/machine/spu/setbuf.c
+++ b/newlib/libc/machine/spu/setbuf.c
@@ -57,7 +57,7 @@ _DEFUN (setbuf, (fp, buf),
args.fp = fp->_fp;
args.buf = buf;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETBUF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETBUF, &args);
return;
}
diff --git a/newlib/libc/machine/spu/setvbuf.c b/newlib/libc/machine/spu/setvbuf.c
index 7c6bf54..b41b4b7 100644
--- a/newlib/libc/machine/spu/setvbuf.c
+++ b/newlib/libc/machine/spu/setvbuf.c
@@ -67,7 +67,7 @@ _DEFUN (setvbuf, (fp, buf, mode, size),
args.size = size;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETVBUF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_SETVBUF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/snprintf.c b/newlib/libc/machine/spu/snprintf.c
index 874d734..d48dc60 100644
--- a/newlib/libc/machine/spu/snprintf.c
+++ b/newlib/libc/machine/spu/snprintf.c
@@ -79,7 +79,7 @@ _DEFUN(snprintf, (str, size, fmt),
va_start (args.ap);
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/sprintf.c b/newlib/libc/machine/spu/sprintf.c
index f304f05..37a319e 100644
--- a/newlib/libc/machine/spu/sprintf.c
+++ b/newlib/libc/machine/spu/sprintf.c
@@ -75,7 +75,7 @@ _DEFUN(sprintf, (str, fmt),
va_start (args.ap);
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/sscanf.c b/newlib/libc/machine/spu/sscanf.c
index 60424d9..3697c17 100644
--- a/newlib/libc/machine/spu/sscanf.c
+++ b/newlib/libc/machine/spu/sscanf.c
@@ -76,7 +76,7 @@ _DEFUN(sscanf, (str, fmt),
va_start (args.ap);
#endif
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
va_end (args.ap);
return *ret;
diff --git a/newlib/libc/machine/spu/sys/syscall.h b/newlib/libc/machine/spu/sys/syscall.h
new file mode 100644
index 0000000..ca44b7d
--- /dev/null
+++ b/newlib/libc/machine/spu/sys/syscall.h
@@ -0,0 +1,4 @@
+#ifndef _SYS_SYSCALL_H
+#define _SYS_SYSCALL_H
+void __send_to_ppe(unsigned int signalcode, unsigned int opcode, void *data);
+#endif
diff --git a/newlib/libc/machine/spu/tmpfile.c b/newlib/libc/machine/spu/tmpfile.c
index 0d8d406..662b8f6 100644
--- a/newlib/libc/machine/spu/tmpfile.c
+++ b/newlib/libc/machine/spu/tmpfile.c
@@ -50,7 +50,7 @@ _DEFUN_VOID (tmpfile)
return NULL;
}
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPFILE, &ret);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPFILE, &ret);
if (ret) {
fp->_fp = ret;
diff --git a/newlib/libc/machine/spu/tmpnam.c b/newlib/libc/machine/spu/tmpnam.c
index cd2856b..d0fe39b 100644
--- a/newlib/libc/machine/spu/tmpnam.c
+++ b/newlib/libc/machine/spu/tmpnam.c
@@ -41,7 +41,7 @@ _DEFUN (tmpnam, (s),
char **ret = &s;
/* The return value gets written over buf
*/
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPNAM, &s);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_TMPNAM, &s);
return *ret;
}
diff --git a/newlib/libc/machine/spu/ungetc.c b/newlib/libc/machine/spu/ungetc.c
index 1383d01..29736b3 100644
--- a/newlib/libc/machine/spu/ungetc.c
+++ b/newlib/libc/machine/spu/ungetc.c
@@ -59,7 +59,7 @@ ungetc (c, fp)
args.fp = fp->_fp;
ret = (int*)&args;
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_UNGETC, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_UNGETC, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vfprintf.c b/newlib/libc/machine/spu/vfprintf.c
index 34128b7..a9f8bfc 100644
--- a/newlib/libc/machine/spu/vfprintf.c
+++ b/newlib/libc/machine/spu/vfprintf.c
@@ -73,7 +73,7 @@ _DEFUN (vfprintf, (fp, fmt0, ap),
args.fmt = (char*) fmt0;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFPRINTF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vfscanf.c b/newlib/libc/machine/spu/vfscanf.c
index ccd6d0b..6849cf5 100644
--- a/newlib/libc/machine/spu/vfscanf.c
+++ b/newlib/libc/machine/spu/vfscanf.c
@@ -73,7 +73,7 @@ _DEFUN (vfscanf, (fp, fmt, ap),
args.fmt = (char*) fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VFSCANF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vprintf.c b/newlib/libc/machine/spu/vprintf.c
index 4341774..eca0158 100644
--- a/newlib/libc/machine/spu/vprintf.c
+++ b/newlib/libc/machine/spu/vprintf.c
@@ -37,7 +37,7 @@ _DEFUN (vprintf, (fmt, ap),
args.fmt = fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VPRINTF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vscanf.c b/newlib/libc/machine/spu/vscanf.c
index 90c879d..8571e5c 100644
--- a/newlib/libc/machine/spu/vscanf.c
+++ b/newlib/libc/machine/spu/vscanf.c
@@ -69,7 +69,7 @@ _DEFUN (vscanf, (fmt, ap),
args.fmt = (char*) fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSCANF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vsnprintf.c b/newlib/libc/machine/spu/vsnprintf.c
index dafb513..09d4292 100644
--- a/newlib/libc/machine/spu/vsnprintf.c
+++ b/newlib/libc/machine/spu/vsnprintf.c
@@ -45,7 +45,7 @@ _DEFUN (vsnprintf, (str, size, fmt, ap),
args.fmt = fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSNPRINTF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vsprintf.c b/newlib/libc/machine/spu/vsprintf.c
index d255654..b36a1a0 100644
--- a/newlib/libc/machine/spu/vsprintf.c
+++ b/newlib/libc/machine/spu/vsprintf.c
@@ -42,7 +42,7 @@ _DEFUN (vsprintf, (str, fmt, ap),
args.fmt = (char*) fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSPRINTF, &args);
return *ret;
}
diff --git a/newlib/libc/machine/spu/vsscanf.c b/newlib/libc/machine/spu/vsscanf.c
index 1add6ef..cd8e1eb 100644
--- a/newlib/libc/machine/spu/vsscanf.c
+++ b/newlib/libc/machine/spu/vsscanf.c
@@ -73,7 +73,7 @@ _DEFUN (vsscanf, (str, fmt, ap),
args.fmt = (char*) fmt;
va_copy(args.ap,ap);
- send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
+ __send_to_ppe(SPE_C99_SIGNALCODE, SPE_C99_VSSCANF, &args);
return *ret;
}