/* Low level interface to SPUs, for the remote server for GDB.
- Copyright (C) 2006-2018 Free Software Foundation, Inc.
+ Copyright (C) 2006-2019 Free Software Foundation, Inc.
Contributed by Ulrich Weigand <uweigand@de.ibm.com>.
#include "server.h"
-#include "gdb_wait.h"
+#include "common/gdb_wait.h"
#include <sys/ptrace.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/syscall.h>
-#include "filestuff.h"
+#include "common/filestuff.h"
#include "hostio.h"
#include "nat/fork-inferior.h"
/* Kill the inferior process. */
static int
-spu_kill (int pid)
+spu_kill (process_info *process)
{
int status, ret;
- struct process_info *process = find_process_pid (pid);
- if (process == NULL)
- return -1;
+ int pid = process->pid;
ptrace (PTRACE_KILL, pid, 0, 0);
}
static void
-spu_join (process_info *proc)
+spu_join (int pid)
{
int status, ret;
do {
- ret = waitpid (proc->pid, &status, 0);
+ ret = waitpid (pid, &status, 0);
if (WIFEXITED (status) || WIFSIGNALED (status))
break;
} while (ret != -1 || errno != ECHILD);