NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES
#include <mem/chMem.h>int svCopyIn(VmAddr src, void * dest, int count);
MEM_FLAT, MEM_PROTECTED, MEM_VIRTUAL
These calls are only used by trap handlers (see svTrapConnect (2K)). They are used to copy the trap caller parameters.
The svCopyIn function copies count bytes from the address src in the caller's address space, to the address dest in the kernel address space. If access to the area defined by src and count in the caller address space produces a memory access fault, svCopyIn will return an error code (K_EFAULT).
The svCopyInString function copies characters from the address src in the caller's address space, to the address dest in the kernel address space until a maximum maxCount bytes have been transferred (including the NULL terminating character), or a NULL character is transferred. If access to the area defined by src and maxCount in the caller address space produces a memory access fault, svCopyInString will return an error code (K_EFAULT). If src string (including the NULL character) is bigger than maxCount, svCopyInString will return an error code (K_ENOMEM). If no error is found during string copy, svCopyInString will return the actual number of characters transferred(including the NULL character).
The svCopyOut function copies count bytes from the address src in the kernel address space, to the address dest in the caller address space. If access to the area defined by dest and count in the caller address space produces a memory access fault, svCopyOut will return an error code (K_EFAULT).
If sucessful, svCopyIn and svCopyOut return 0. Otherwise, they return K_EFAULT. If successful, svCopyInString returns the number of characters transferred, otherwise, it returnsK_EFAULT, or K_ENOMEM.
Access to the provided caller's data produced a memory access fault.
String is longer than requested.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ERRORS | ATTRIBUTES