copyin函数

详见:http://pic.dhe.ibm.com/infocenter/aix/v6r1/index.jsp?topic=%2Fcom.ibm.aix.kerneltechref%2Fdoc%2Fktechrf1%2Fcopyin.htm

copyin Kernel Service

Purpose

Copies data between user and kernel memory.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
int copyin ( uaddr,  kaddr,  count)
char *uaddr;
char *kaddr;
int count;

Parameters

ItemDescription
uaddr Specifies the address of user data.
kaddr Specifies the address of kernel data.
count Specifies the number of bytes to copy.

Description

The copyin kernel service copies the specified number of bytes from user memory to kernel memory. This service is provided so that system calls and device driver top half routines can safely access user data. The copyin service ensures that the user has the appropriate authority to access the data. It also provides recovery from paging I/O errors that would otherwise cause the system to crash. The copyin service should be called only while executing in kernel mode in the user process.
posted on 2013-09-13 14:14  语辰  阅读(830)  评论(0编辑  收藏  举报