xmdetach Kernel Service
Purpose
Detaches from a user buffer used for cross-memory operations.
Syntax
#include <sys/types.h>
#include <sys/errno.h>
#include <sys/xmem.h>
struct xmem *dp;
Parameter
Item | Description |
---|---|
dp | Points to a cross-memory descriptor initialized by the xmattach kernel service. |
Description
The xmdetach kernel service informs the kernel that a user buffer can no longer be accessed. This means that some previous caller, typically a device driver bottom half or a kernel process, is no longer permitted to do cross-memory operations on this buffer. Subsequent calls to either the xmemin or xmemout kernel service using this cross-memory descriptor result in an error return. The cross-memory descriptor is set to dp->aspace_id = XMEM_INVAL so that the descriptor can be used again. "Cross Memory Kernel Services" in Memory Kernel Services in Kernel Extensions and Device Support Programming Concepts describes how the cross-memory kernel services use cross-memory descriptors.
Execution Environment
The xmdetach kernel service can be called from either the process or interrupt environment.
Return Values
Item | Description |
---|---|
XMEM_SUCC | Indicates successful completion. |
XMEM_FAIL | Indicates that the descriptor was not valid or the buffer was not defined. |