aboutsummaryrefslogtreecommitdiff
path: root/libgloss
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2006-08-30 19:06:48 +0000
committerJeff Johnston <jjohnstn@redhat.com>2006-08-30 19:06:48 +0000
commit52d82ba5277b854196ed538aa5966155abbfd225 (patch)
tree5e1acb16ec97eac22fe2abd6aae78235f7db6291 /libgloss
parent6f91c38b890386ab43e7dd66760d7f296bffb539 (diff)
downloadnewlib-52d82ba5277b854196ed538aa5966155abbfd225.zip
newlib-52d82ba5277b854196ed538aa5966155abbfd225.tar.gz
newlib-52d82ba5277b854196ed538aa5966155abbfd225.tar.bz2
2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
* spu/syscalls.c: Add a new argument to _send_to_ppe() to specify signal code. * spu/jsre.h: Update declaration of _send_to_ppe(). * spu/close.c: Replace _send_to_ppe_0x2101() by _send_to_ppe(). * spu/fstat.c: Ditto. * spu/lseek.c: Ditto. * spu/open.c: Ditto. * spu/read.c: Ditto. * spu/stat.c: Ditto. * spu/unlink.c: Ditto. * spu/write.c: Ditto.
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/ChangeLog14
-rw-r--r--libgloss/spu/close.c2
-rw-r--r--libgloss/spu/fstat.c2
-rw-r--r--libgloss/spu/jsre.h4
-rw-r--r--libgloss/spu/lseek.c2
-rw-r--r--libgloss/spu/open.c2
-rw-r--r--libgloss/spu/read.c2
-rw-r--r--libgloss/spu/stat.c2
-rw-r--r--libgloss/spu/syscalls.c6
-rw-r--r--libgloss/spu/unlink.c2
-rw-r--r--libgloss/spu/write.c2
11 files changed, 29 insertions, 11 deletions
diff --git a/libgloss/ChangeLog b/libgloss/ChangeLog
index b494970..86591ac 100644
--- a/libgloss/ChangeLog
+++ b/libgloss/ChangeLog
@@ -1,5 +1,19 @@
2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
+ * spu/syscalls.c: Add a new argument to _send_to_ppe() to
+ specify signal code.
+ * spu/jsre.h: Update declaration of _send_to_ppe().
+ * spu/close.c: Replace _send_to_ppe_0x2101() by _send_to_ppe().
+ * spu/fstat.c: Ditto.
+ * spu/lseek.c: Ditto.
+ * spu/open.c: Ditto.
+ * spu/read.c: Ditto.
+ * spu/stat.c: Ditto.
+ * spu/unlink.c: Ditto.
+ * spu/write.c: Ditto.
+
+2006-08-30 Kazunori Asayama <asayama@sm.sony.co.jp>
+
* spu/Makefile.in: Add dependency.
2006-08-24 Paul Brook <paul@codesourcery.com>
diff --git a/libgloss/spu/close.c b/libgloss/spu/close.c
index 4810447..2de16d0 100644
--- a/libgloss/spu/close.c
+++ b/libgloss/spu/close.c
@@ -41,7 +41,7 @@ close (int file)
sys.file = file;
- _send_to_ppe_0x2101 (JSRE_CLOSE, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_CLOSE, &sys);
errno = psys_out->err;
return ( psys_out->rc);
diff --git a/libgloss/spu/fstat.c b/libgloss/spu/fstat.c
index 7a49202..cd58c29 100644
--- a/libgloss/spu/fstat.c
+++ b/libgloss/spu/fstat.c
@@ -44,7 +44,7 @@ fstat (int file, struct stat *pstat)
sys.file = file;
sys.ptr = ( unsigned int )&pjstat;
- _send_to_ppe_0x2101 (JSRE_FSTAT, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_FSTAT, &sys);
pstat->st_dev = pjstat.dev;
pstat->st_ino = pjstat.ino;
diff --git a/libgloss/spu/jsre.h b/libgloss/spu/jsre.h
index b366f60..2bf0be0 100644
--- a/libgloss/spu/jsre.h
+++ b/libgloss/spu/jsre.h
@@ -52,6 +52,8 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
#define JSRE_O_SYNC 4096
#define JSRE_O_ASYNC 8192
+#define JSRE_POSIX1_SIGNALCODE 0x2101
+
#define JSRE_CLOSE 2
#define JSRE_FSTAT 4
#define JSRE_LSEEK 9
@@ -152,6 +154,6 @@ typedef struct {
unsigned int ctime;
} jsre_stat_t;
-void _send_to_ppe_0x2101 (int opcode, void *data);
+void _send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data);
#endif
diff --git a/libgloss/spu/lseek.c b/libgloss/spu/lseek.c
index bb57c6a..7c3f451 100644
--- a/libgloss/spu/lseek.c
+++ b/libgloss/spu/lseek.c
@@ -55,7 +55,7 @@ lseek (int file, off_t offset, int whence)
break;
}
- _send_to_ppe_0x2101 (JSRE_LSEEK, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_LSEEK, &sys);
errno = psys_out->err;
return ( psys_out->rc);
diff --git a/libgloss/spu/open.c b/libgloss/spu/open.c
index 05a2274..af048a8 100644
--- a/libgloss/spu/open.c
+++ b/libgloss/spu/open.c
@@ -81,7 +81,7 @@ open (const char *filename, int flags, ...)
sys.mode = 0;
}
- _send_to_ppe_0x2101 ( JSRE_OPEN, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);
errno = psys_out->err;
return ( psys_out->rc);
diff --git a/libgloss/spu/read.c b/libgloss/spu/read.c
index 5806108..178e850 100644
--- a/libgloss/spu/read.c
+++ b/libgloss/spu/read.c
@@ -44,7 +44,7 @@ read (int file, void *ptr, size_t len)
sys.ptr = ( unsigned int )ptr;
sys.len = len;
- _send_to_ppe_0x2101 (JSRE_READ, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_READ, &sys);
errno = psys_out->err;
return ( psys_out->rc);
diff --git a/libgloss/spu/stat.c b/libgloss/spu/stat.c
index fe6513f..05e64ac 100644
--- a/libgloss/spu/stat.c
+++ b/libgloss/spu/stat.c
@@ -45,7 +45,7 @@ stat (const char *pathname, struct stat *pstat)
sys.pathname = pathname;
sys.ptr = ( unsigned int )&pjstat;
- _send_to_ppe_0x2101 (JSRE_STAT, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_STAT, &sys);
pstat->st_dev = pjstat.dev;
pstat->st_ino = pjstat.ino;
diff --git a/libgloss/spu/syscalls.c b/libgloss/spu/syscalls.c
index 26c3c99..65c6df9 100644
--- a/libgloss/spu/syscalls.c
+++ b/libgloss/spu/syscalls.c
@@ -30,14 +30,16 @@ POSSIBILITY OF SUCH DAMAGE.
Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
*/
+#include "jsre.h"
+
void
-_send_to_ppe_0x2101 (int opcode, void *data)
+_send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data)
{
unsigned int combined = ( ( opcode<<24 )&0xff000000 ) | ( ( unsigned int )data & 0x00ffffff );
vector unsigned int stopfunc = {
- 0x00002101, /* stop 0x2101 */
+ signalcode, /* stop */
(unsigned int) combined,
0x4020007f, /* nop */
0x35000000 /* bi $0 */
diff --git a/libgloss/spu/unlink.c b/libgloss/spu/unlink.c
index c6a746e..6d143ca 100644
--- a/libgloss/spu/unlink.c
+++ b/libgloss/spu/unlink.c
@@ -41,7 +41,7 @@ unlink (const char *pathname)
sys.pathname = ( unsigned int )pathname;
- _send_to_ppe_0x2101 (JSRE_UNLINK, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_UNLINK, &sys);
errno = psys_out->err;
return ( psys_out->rc);
diff --git a/libgloss/spu/write.c b/libgloss/spu/write.c
index 97f2174..4952f67 100644
--- a/libgloss/spu/write.c
+++ b/libgloss/spu/write.c
@@ -44,7 +44,7 @@ write (int file, const void *ptr, size_t len)
sys.ptr = ( unsigned int )ptr;
sys.len = len;
- _send_to_ppe_0x2101 (JSRE_WRITE, &sys);
+ _send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_WRITE, &sys);
errno = psys_out->err;
return ( psys_out->rc);