static void
spu_resume (struct thread_resume *resume_info, size_t n)
{
+ struct thread_info *thr = get_first_thread ();
size_t i;
for (i = 0; i < n; i++)
if (ptid_equal (resume_info[i].thread, minus_one_ptid)
- || ptid_equal (resume_info[i].thread, current_ptid))
+ || ptid_equal (resume_info[i].thread, ptid_of (thr)))
break;
if (i == n)
regcache_invalidate ();
errno = 0;
- ptrace (PTRACE_CONT, ptid_get_lwp (current_ptid), 0, resume_info[i].sig);
+ ptrace (PTRACE_CONT, ptid_get_lwp (ptid_of (thr)), 0, resume_info[i].sig);
if (errno)
perror_with_name ("ptrace");
}
static void
spu_request_interrupt (void)
{
- syscall (SYS_tkill, ptid_get_lwp (current_ptid), SIGINT);
+ struct thread_info *thr = get_first_thread ();
+
+ syscall (SYS_tkill, ptid_get_lwp (thr), SIGINT);
}
static struct target_ops spu_target_ops = {