]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/bsd_ppc.c
xnu-201.42.3.tar.gz
[apple/xnu.git] / osfmk / ppc / bsd_ppc.c
index 8918fed40fdae07b3542ae501d1e3f09b59a76a5..e866c31bfb7b9f37c40da2f3da8acc30cbe6f9b0 100644 (file)
@@ -119,7 +119,7 @@ unix_syscall(
     code = regs->r0;
 
     thread = current_act();
-       p = get_bsdtask_info(current_task());
+       p = current_proc();
        rval = (int *)get_bsduthreadrval(thread);
 
     /*
@@ -189,6 +189,10 @@ unix_syscall(
        current_task()->syscalls_unix++;
        error = (*(callp->sy_call))(p, (void *)vt, rval);
 
+       regs = find_user_regs(thread);
+       if (regs == (struct ppc_saved_state  *)0)
+               panic("No user savearea while returning from system call");
+
     if (error == ERESTART) {
        regs->srr0 -= 8;
     }
@@ -232,7 +236,7 @@ unix_syscall_return(error)
        extern int nsysent;
 
     thread = current_act();
-       p = get_bsdtask_info(current_task());
+       p = current_proc();
        rval = (int *)get_bsduthreadrval(thread);
        pcb = thread->mact.pcb;
     regs = &pcb->ss;