uio_machdep.c (139735) | uio_machdep.c (176886) |
---|---|
1/*- 2 * Copyright (c) 2004 Alan L. Cox <alc@cs.rice.edu> 3 * Copyright (c) 1982, 1986, 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * (c) UNIX System Laboratories, Inc. 6 * All or some portions of this file are derived from material licensed 7 * to the University of California by American Telephone and Telegraph 8 * Co. or Unix System Laboratories, Inc. and are reproduced herein with --- 26 unchanged lines hidden (view full) --- 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 40 */ 41 42#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2004 Alan L. Cox <alc@cs.rice.edu> 3 * Copyright (c) 1982, 1986, 1991, 1993 4 * The Regents of the University of California. All rights reserved. 5 * (c) UNIX System Laboratories, Inc. 6 * All or some portions of this file are derived from material licensed 7 * to the University of California by American Telephone and Telegraph 8 * Co. or Unix System Laboratories, Inc. and are reproduced herein with --- 26 unchanged lines hidden (view full) --- 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * @(#)kern_subr.c 8.3 (Berkeley) 1/21/94 40 */ 41 42#include <sys/cdefs.h> |
43__FBSDID("$FreeBSD: head/sys/arm/arm/uio_machdep.c 139735 2005-01-05 21:58:49Z imp $"); | 43__FBSDID("$FreeBSD: head/sys/arm/arm/uio_machdep.c 176886 2008-03-06 22:27:35Z cognet $"); |
44 45#include <sys/param.h> 46#include <sys/kernel.h> 47#include <sys/lock.h> 48#include <sys/mutex.h> 49#include <sys/proc.h> 50#include <sys/systm.h> 51#include <sys/uio.h> --- 43 unchanged lines hidden (view full) --- 95 switch (uio->uio_segflg) { 96 case UIO_USERSPACE: 97 if (ticks - PCPU_GET(switchticks) >= hogticks) 98 uio_yield(); 99 if (uio->uio_rw == UIO_READ) 100 error = copyout(cp, iov->iov_base, cnt); 101 else 102 error = copyin(iov->iov_base, cp, cnt); | 44 45#include <sys/param.h> 46#include <sys/kernel.h> 47#include <sys/lock.h> 48#include <sys/mutex.h> 49#include <sys/proc.h> 50#include <sys/systm.h> 51#include <sys/uio.h> --- 43 unchanged lines hidden (view full) --- 95 switch (uio->uio_segflg) { 96 case UIO_USERSPACE: 97 if (ticks - PCPU_GET(switchticks) >= hogticks) 98 uio_yield(); 99 if (uio->uio_rw == UIO_READ) 100 error = copyout(cp, iov->iov_base, cnt); 101 else 102 error = copyin(iov->iov_base, cp, cnt); |
103 if (error) | 103 if (error) { 104 sf_buf_free(sf); |
104 goto out; | 105 goto out; |
106 } |
|
105 break; 106 case UIO_SYSSPACE: 107 if (uio->uio_rw == UIO_READ) 108 bcopy(cp, iov->iov_base, cnt); 109 else 110 bcopy(iov->iov_base, cp, cnt); 111 break; 112 case UIO_NOCOPY: --- 15 unchanged lines hidden --- | 107 break; 108 case UIO_SYSSPACE: 109 if (uio->uio_rw == UIO_READ) 110 bcopy(cp, iov->iov_base, cnt); 111 else 112 bcopy(iov->iov_base, cp, cnt); 113 break; 114 case UIO_NOCOPY: --- 15 unchanged lines hidden --- |