2008-09-10 Ken Werner <ken.werner@de.ibm.com>
* spu/dirfuncs.c: Avoid warnings. * spu/kill.c: Likewise.
This commit is contained in:
parent
e841b018cb
commit
9ecc83a3f7
|
@ -1,3 +1,8 @@
|
|||
2008-09-10 Ken Werner <ken.werner@de.ibm.com>
|
||||
|
||||
* spu/dirfuncs.c: Avoid warnings.
|
||||
* spu/kill.c: Likewise.
|
||||
|
||||
2008-09-04 Ken Werner <ken.werner@de.ibm.com>
|
||||
|
||||
* spu/Makefile.in: Fix missing linux_syscalls.o.
|
||||
|
|
|
@ -56,22 +56,30 @@ typedef struct {
|
|||
unsigned int pad0[3];
|
||||
} syscall_opendir_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t dir;
|
||||
unsigned int pad0[2];
|
||||
} syscall_opendir_ret_t;
|
||||
|
||||
DIR *
|
||||
opendir (const char *name)
|
||||
{
|
||||
DIR *dir;
|
||||
int ppc_dir, i;
|
||||
syscall_opendir_t sys;
|
||||
int i;
|
||||
union {
|
||||
syscall_opendir_t sys;
|
||||
syscall_opendir_ret_t ret;
|
||||
} u;
|
||||
|
||||
sys.name = (unsigned int) name;
|
||||
u.sys.name = (unsigned int) name;
|
||||
for (i = 0; i < SPE_OPENDIR_MAX; i++) {
|
||||
if (!spe_dir[i].ppc_dir) {
|
||||
dir = &spe_dir[i];
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPENDIR, &sys);
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_OPENDIR, &u);
|
||||
/*
|
||||
* Pull 64 bits out of the result.
|
||||
*/
|
||||
dir->ppc_dir = ((uint64_t*)&sys)[0];
|
||||
dir->ppc_dir = u.ret.dir;
|
||||
if (!dir->ppc_dir) {
|
||||
dir = NULL;
|
||||
}
|
||||
|
@ -163,5 +171,5 @@ telldir (DIR *dir)
|
|||
{
|
||||
uint64_t ppc_dir = dir->ppc_dir;
|
||||
|
||||
__send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_TELLDIR, &ppc_dir);
|
||||
return __send_to_ppe (JSRE_POSIX1_SIGNALCODE, JSRE_TELLDIR, &ppc_dir);
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
|
|||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
int
|
||||
kill (int pid, int sig)
|
||||
|
@ -39,5 +40,7 @@ kill (int pid, int sig)
|
|||
{
|
||||
_exit (sig);
|
||||
}
|
||||
errno = ESRCH;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue