Attaches to a user buffer for cross-memory operations.
|addr64||Specifies the address of the user buffer to be accessed in a cross-memory operation.|
|count||Indicates the size of the user buffer to be accessed in a cross-memory operation.|
|dp||Specifies a cross-memory descriptor. The dp->aspace_id variable must be set to a value of XMEM_INVAL.|
|segflag||Specifies a segment flag. This flag is used to determine the address space of the memory that the cross-memory descriptor applies to. The valid values for this flag can be found in the /usr/include/xmem.h file.|
The xmattach64 kernel service prepares the user buffer so that a device driver can access it without executing under the process that requested the I/O operation. A device top-half routine calls the xmattach64 kernel service. The xmattach64 kernel service allows a kernel process or device bottom-half routine to access the user buffer with the xmemin or xmemout kernel services. The device driver must use the xmdetach kernel service to inform the kernel when it has finished accessing the user buffer. The kernel remembers which segments are attached for cross-memory operations. Resources associated with these segments cannot be freed until all cross-memory descriptors have been detached. See "Cross Memory Kernel Services" in Memory Kernel Services
The address of the buffer to attach to: addr64, is interpreted as being either a 64-bit unremapped address, or a 32-bit unremapped address, as a function of both whether the current user-address space is 64 or 32-bits, and the input segflag parameter.
The input addr64 is interpreted to be a 64-bit address (in user space), if and only if, all of the following conditions apply:
In all other cases, the input address (addr64), is treated as a 32-bit unremapped address.
The xmattach64 kernel service can be called from the process environment only.
|XMEM_SUCC||Indicates a successful operation.|
|XMEM_FAIL||Indicates one of the following errors:|
The xmattach64 kernel service is part of Base Operating System (BOS) Runtime.
The uphysio kernel service, xmdetach kernel service, xmattach kernel service, xmemin kernel service, and xmemout kernel service.
Cross Memory Kernel Services, and Memory Kernel Services.