Determines the maximum permissible count value for a subsequent call to xm_mapin.
#include <sys/adspace.h>
int xm_maxmap (dp, uaddr, len)
struct xmem *dp;
void *uaddr;
size_t *len;
| Item | Description |
|---|---|
| dp | Points to the cross memory descriptor. |
| uaddr | Points to the virtual buffer. |
| len | Points to where the maximum permissible count is returned. |
The xm_maxmap kernel service determines the maximum permissible count value (in bytes) for a subsequent xm_mapin call. The value is determined based on the input cross-memory descriptor dp and the starting address uaddr, and it is returned in the len parameter. There is no guarantee that xm_mapin will succeed; however, it is guaranteed that uaddr + *len - 1 is in the same segment as uaddr, and therefore xm_mapin will not return EAGAIN.
The xm_maxmap interface can be called from the process or interrupt environment.
| Item | Description |
|---|---|
| XMEM_SUCC | Successful (Reference parameter len contains the maximum permissible value for a subsequent xm_mapin call) |
| XMEM_FAIL | Invalid cross memory descriptor. |
| EAGAIN | Segment boundary crossing encountered. Caller should make separate xm_mapin calls to map each segment's worth. |