2007-04-04 Patrick Mansfield <patmans@us.ibm.com>

* spu/syscalls.c: Rename _send_to_ppe __send_to_ppe, and set errno
        on return from the offload call.
        * spu/jsre.h: Include sys/syscall.h for the send_to_ppe prototype.
        * spu/access.c: Call __send_to_ppe instead of _send_to_ppe, and
        remove the setting of errno.
        * 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:
Jeff Johnston
2007-04-04 20:59:38 +00:00
parent a706aa2e1c
commit c6e05f0d08
15 changed files with 36 additions and 38 deletions

View File

@@ -29,10 +29,11 @@ POSSIBILITY OF SUCH DAMAGE.
Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
*/
#include <errno.h>
#include "jsre.h"
void
_send_to_ppe (unsigned int signalcode, unsigned 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 );
@@ -46,6 +47,7 @@ _send_to_ppe (unsigned int signalcode, unsigned int opcode, void *data)
void (*f) (void) = (void *) &stopfunc;
asm ("sync");
return (f ());
f ();
errno = ((unsigned int *) data)[3];
}