sys/vm/vm_vmspace.c
int
sys_vmspace_pread(struct vmspace_pread_args *uap)
{
	struct vkernel_proc *vkp;
	struct vmspace_entry *ve;
	int error;

	get_mplock();
	if ((vkp = curproc->p_vkernel) == NULL) {
		error = EINVAL;
		goto done3;
	}
	lwkt_gettoken(&vkp->token);
	if ((ve = vkernel_find_vmspace(vkp, uap->id)) == NULL) {
		error = ENOENT;
		goto done2;
	}
	error = EINVAL;
done2:
	lwkt_reltoken(&vkp->token);
done3:
	rel_mplock();
	return (error);
}
/* 
 * vmspace_pread(id, buf, nbyte, flags, offset)
 *
 * Read data from a vmspace.  The number of bytes read is returned or
 * -1 if an unrecoverable error occured.  If the number of bytes read is
 * less then the request size, a page fault occured in the VMSPACE which
 * the caller must resolve in order to proceed.
 *
 * (not implemented yet)
 * No requirements.
 */
vmspace_pread(id, buf, nbyte, flags, offset)
Read data from a vmspace.  The number of bytes read is returned or
-1 if an unrecoverable error occured.  If the number of bytes read is
less then the request size, a page fault occured in the VMSPACE which
the caller must resolve in order to proceed.

(not implemented yet)
No requirements.
vmspace_pread ( id buf nbyte flags offset ) Read data from a vmspace . The number of bytes read is returned or - 1 if an unrecoverable error occured . If the number of bytes read is less then the request size a page fault occured in the VMSPACE which the caller must resolve in order to proceed . ( not implemented yet ) No requirements .
int
sys_vmspace_pread(struct vmspace_pread_args *uap)
{
	struct vkernel_proc *vkp;
	struct vmspace_entry *ve;
	int error;
	get_mplock();
	if ((vkp = curproc->p_vkernel) == NULL) {
		error = EINVAL;
		goto done3;
	}
	lwkt_gettoken(&vkp->token);
	if ((ve = vkernel_find_vmspace(vkp, uap->id)) == NULL) {
		error = ENOENT;
		goto done2;
	}
	error = EINVAL;
done2:
	lwkt_reltoken(&vkp->token);
done3:
	rel_mplock();
	return (error);
}
int sys_vmspace_pread ( struct vmspace_pread_args * uap ) { struct vkernel_proc * vkp ; struct vmspace_entry * ve ; int error ; get_mplock ( ) ; if ( ( vkp = curproc -> p_vkernel ) == NULL ) { error = EINVAL ; goto done3 ; } lwkt_gettoken ( & vkp -> token ) ; if ( ( ve = vkernel_find_vmspace ( vkp , uap -> id ) ) == NULL ) { error = ENOENT ; goto done2 ; } error = EINVAL ; done2 : lwkt_reltoken ( & vkp -> token ) ; done3 : rel_mplock ( ) ; return ( error ) ; }
vmspace_pread(id, buf, nbyte, flags, offset)
 Read data from a vmspace.
vmspace_pread ( id buf nbyte flags offset ) Read data from a vmspace .