Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/procfs/procfs_regs.c
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Lines | if (p_candebug(td, p)) { | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (EPERM); | return (EPERM); | ||||
} | } | ||||
if (!P_SHOULDSTOP(p)) { | if (!P_SHOULDSTOP(p)) { | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (EBUSY); | return (EBUSY); | ||||
} | } | ||||
/* XXXKSE: */ | |||||
td2 = FIRST_THREAD_IN_PROC(p); | td2 = FIRST_THREAD_IN_PROC(p); | ||||
#ifdef COMPAT_FREEBSD32 | #ifdef COMPAT_FREEBSD32 | ||||
if (SV_CURPROC_FLAG(SV_ILP32)) { | if (SV_CURPROC_FLAG(SV_ILP32)) { | ||||
if ((SV_PROC_FLAG(td2->td_proc, SV_ILP32)) == 0) { | if ((SV_PROC_FLAG(td2->td_proc, SV_ILP32)) == 0) { | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
wrap32 = 1; | wrap32 = 1; | ||||
} | memset(&r32, 0, sizeof(r32)); | ||||
} else | |||||
#endif | #endif | ||||
memset(&r, 0, sizeof(r)); | |||||
error = PROC(read, regs, td2, &r); | error = PROC(read, regs, td2, &r); | ||||
if (error == 0) { | if (error == 0) { | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
error = UIOMOVE_FROMBUF(r, uio); | error = UIOMOVE_FROMBUF(r, uio); | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
} | } | ||||
if (error == 0 && uio->uio_rw == UIO_WRITE) { | if (error == 0 && uio->uio_rw == UIO_WRITE) { | ||||
if (!P_SHOULDSTOP(p)) | if (!P_SHOULDSTOP(p)) | ||||
Show All 9 Lines |