2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
* spu/syscalls.c: Change __send_to_ppe to return the result stored in stored in slot 0 of the data, rather than have each assisted call retrieve the value. * spu/jsre.h: Remove the now unused syscall_out_t. * spu/access.c: Use the __send_to_ppe result instead of the slot 0 value, remove unused syscall_out_t variable. * spu/close.c: Ditto. * spu/dup.c: Ditto. * spu/fstat.c: Ditto. * spu/ftruncate.c: Ditto. * spu/gettimeofday.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.
This commit is contained in:
parent
9a3ec8622b
commit
a0050b64fc
@ -1,3 +1,23 @@
|
||||
2007-05-23 Patrick Mansfield <patmans@us.ibm.com>
|
||||
|
||||
* spu/syscalls.c: Change __send_to_ppe to return the result stored
|
||||
in stored in slot 0 of the data, rather than have each assisted
|
||||
call retrieve the value.
|
||||
* spu/jsre.h: Remove the now unused syscall_out_t.
|
||||
* spu/access.c: Use the __send_to_ppe result instead of the slot 0
|
||||
value, remove unused syscall_out_t variable.
|
||||
* spu/close.c: Ditto.
|
||||
* spu/dup.c: Ditto.
|
||||
* spu/fstat.c: Ditto.
|
||||
* spu/ftruncate.c: Ditto.
|
||||
* spu/gettimeofday.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.
|
||||
|
||||
2007-05-23 Kazu Hirata <kazu@codesourcery.com>
|
||||
|
||||
* m68k/fido.sc (.data): Move .jcr to .text. Catch .got.plt
|
||||
|
@ -35,13 +35,8 @@ int
|
||||
access (const char *pathname, int mode)
|
||||
{
|
||||
syscall_access_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.pathname = (unsigned int) pathname;
|
||||
sys.mode = mode;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_ACCESS, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_ACCESS, &sys);
|
||||
}
|
||||
|
||||
|
@ -35,13 +35,8 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
|
||||
int
|
||||
close (int file)
|
||||
{
|
||||
syscall_close_t sys ;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
syscall_close_t sys;
|
||||
|
||||
sys.file = file;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_CLOSE, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_CLOSE, &sys);
|
||||
}
|
||||
|
||||
|
@ -35,12 +35,7 @@ int
|
||||
dup (int oldfd)
|
||||
{
|
||||
syscall_dup_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.oldfd = oldfd;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_DUP, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_DUP, &sys);
|
||||
}
|
||||
|
||||
|
@ -37,13 +37,12 @@ int
|
||||
fstat (int file, struct stat *pstat)
|
||||
{
|
||||
syscall_fstat_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
jsre_stat_t pjstat;
|
||||
int ret;
|
||||
|
||||
sys.file = file;
|
||||
sys.ptr = ( unsigned int )&pjstat;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_FSTAT, &sys);
|
||||
ret = __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_FSTAT, &sys);
|
||||
|
||||
pstat->st_dev = pjstat.dev;
|
||||
pstat->st_ino = pjstat.ino;
|
||||
@ -59,7 +58,5 @@ fstat (int file, struct stat *pstat)
|
||||
pstat->st_mtime = pjstat.mtime;
|
||||
pstat->st_ctime = pjstat.ctime;
|
||||
|
||||
|
||||
return( psys_out->rc );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -35,13 +35,8 @@ int
|
||||
ftruncate (int file, off_t length)
|
||||
{
|
||||
syscall_ftruncate_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.file = file;
|
||||
sys.length = length;
|
||||
|
||||
__send_to_ppe(JSRE_POSIX1_SIGNALCODE, JSRE_FTRUNCATE, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe(JSRE_POSIX1_SIGNALCODE, JSRE_FTRUNCATE, &sys);
|
||||
}
|
||||
|
||||
|
@ -38,12 +38,8 @@ int
|
||||
gettimeofday (struct timeval *tv, struct timezone *tz)
|
||||
{
|
||||
syscall_gettimeofday_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.tv = (unsigned int)tv;
|
||||
sys.tz = (unsigned int)tz;
|
||||
|
||||
__send_to_ppe(JSRE_POSIX1_SIGNALCODE, JSRE_GETTIMEOFDAY, &sys);
|
||||
|
||||
return (psys_out->rc);
|
||||
return __send_to_ppe(JSRE_POSIX1_SIGNALCODE, JSRE_GETTIMEOFDAY, &sys);
|
||||
}
|
||||
|
@ -165,13 +165,6 @@ typedef struct
|
||||
unsigned int pad1[ 3 ];
|
||||
} syscall_stat_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
unsigned int rc;
|
||||
unsigned int pad0[ 2 ];
|
||||
unsigned int err;
|
||||
} syscall_out_t;
|
||||
|
||||
typedef struct {
|
||||
unsigned int dev;
|
||||
unsigned int ino;
|
||||
|
@ -37,7 +37,6 @@ off_t
|
||||
lseek (int file, off_t offset, int whence)
|
||||
{
|
||||
syscall_lseek_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.file = file;
|
||||
sys.offset = offset;
|
||||
@ -54,8 +53,5 @@ lseek (int file, off_t offset, int whence)
|
||||
break;
|
||||
}
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_LSEEK, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_LSEEK, &sys);
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
|
||||
int
|
||||
open (const char *filename, int flags, ...)
|
||||
{
|
||||
syscall_open_t sys ;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
syscall_open_t sys;
|
||||
va_list ap;
|
||||
|
||||
sys.pathname = ( unsigned int )filename;
|
||||
@ -70,8 +69,5 @@ open (const char *filename, int flags, ...)
|
||||
sys.mode = va_arg (ap, int);
|
||||
va_end (ap);
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPEN, &sys);
|
||||
}
|
||||
|
||||
|
@ -37,14 +37,9 @@ int
|
||||
read (int file, void *ptr, size_t len)
|
||||
{
|
||||
syscall_write_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.file = file;
|
||||
sys.ptr = ( unsigned int )ptr;
|
||||
sys.len = len;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_READ, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_READ, &sys);
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,12 @@ int
|
||||
stat (const char *pathname, struct stat *pstat)
|
||||
{
|
||||
syscall_stat_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
jsre_stat_t pjstat;
|
||||
int ret;
|
||||
|
||||
sys.pathname = (unsigned int)pathname;
|
||||
sys.ptr = ( unsigned int )&pjstat;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_STAT, &sys);
|
||||
ret = __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_STAT, &sys);
|
||||
|
||||
pstat->st_dev = pjstat.dev;
|
||||
pstat->st_ino = pjstat.ino;
|
||||
@ -60,6 +59,5 @@ stat (const char *pathname, struct stat *pstat)
|
||||
pstat->st_mtime = pjstat.mtime;
|
||||
pstat->st_ctime = pjstat.ctime;
|
||||
|
||||
return( psys_out->rc );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
|
||||
#include <errno.h>
|
||||
#include "jsre.h"
|
||||
|
||||
void
|
||||
int
|
||||
__send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data)
|
||||
{
|
||||
|
||||
@ -49,5 +49,10 @@ __send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data)
|
||||
asm ("sync");
|
||||
f ();
|
||||
errno = ((unsigned int *) data)[3];
|
||||
|
||||
/*
|
||||
* Return the rc code stored in slot 0.
|
||||
*/
|
||||
return ((unsigned int *) data)[0];
|
||||
}
|
||||
|
||||
|
@ -35,13 +35,8 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
|
||||
int
|
||||
unlink (const char *pathname)
|
||||
{
|
||||
syscall_unlink_t sys ;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
syscall_unlink_t sys;
|
||||
|
||||
sys.pathname = ( unsigned int )pathname;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_UNLINK, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_UNLINK, &sys);
|
||||
}
|
||||
|
||||
|
@ -37,14 +37,9 @@ int
|
||||
write (int file, const void *ptr, size_t len)
|
||||
{
|
||||
syscall_write_t sys;
|
||||
syscall_out_t *psys_out = ( syscall_out_t* )&sys;
|
||||
|
||||
sys.file = file;
|
||||
sys.ptr = ( unsigned int )ptr;
|
||||
sys.len = len;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_WRITE, &sys);
|
||||
|
||||
return ( psys_out->rc);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_WRITE, &sys);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user