Detaches from a user buffer used for cross-memory operations.
#include <sys/types.h> #include <sys/errno.h> #include <sys/xmem.h>
int xmdetach (dp) struct xmem *dp;
|dp||Points to a cross-memory descriptor initialized by the xmattach kernel service.|
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 AIX Kernel Extensions and Device Support Programming Concepts describes how the cross-memory kernel services use cross-memory descriptors.
The xmdetach kernel service can be called from either the process or interrupt environment.
|XMEM_SUCC||Indicates successful completion.|
|XMEM_FAIL||Indicates that the descriptor was not valid or the buffer was not defined.|
The xmdetach kernel service is part of Base Operating System (BOS) Runtime.
The xmattach kernel service, xmemin kernel service, xmemout kernel service.
Cross Memory Kernel Services and Memory Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.