Copies data between user and kernel memory.
#include <sys/types.h> #include <sys/errno.h>
int copyin (uaddr, kaddr, count) char *uaddr; char *kaddr; int count;
|uaddr||Specifies the address of user data.|
|kaddr||Specifies the address of kernel data.|
|count||Specifies the number of bytes to copy.|
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.
The copyin kernel service can be called from the process environment only.
|0||Indicates a successful operation.|
|EFAULT||Indicates that the user has insufficient authority to access the data, or the address specified in the uaddr parameter is not valid.|
|EIO||Indicates that a permanent I/O error occurred while referencing data.|
|ENOMEM||Indicates insufficient memory for the required paging operation.|
|ENOSPC||Indicates insufficient file system or paging space.|
The copyin kernel service is part of Base Operating System (BOS) Runtime.
Accessing User-Mode Data While in Kernel Mode and Memory Kernel Services in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.
The copyinstr kernel service, copyout kernel service.