cc [ flag… ] file… -llgrp [ library… ] #include <sys/lgrp_user.h>int lgrp_latency(lgrp_id_t from, lgrp_id_t to);
The lgrp_latency() function returns the latency value between a CPU in the from lgroup to the memory in the to lgroup. If from is the same lgroup as to, the latency value within that lgroup is returned.
The latency value is defined by the operating system and is platform-specific. It can be used only for relative comparison of lgroups on the running system. It does not necessarily represent the actual latency between hardware devices, and it might not be applicable across platforms.
Upon successful completion, the latency value is returned. Otherwise -1 is returned and errno is set to indicate the error.
The lgrp_latency() function will fail if:
The specified lgroup ID is not valid.
The specified lgroup ID was not found, the from lgroup does not contain any CPUs, or the to lgroup does not have any memory.
See attributes(5) for descriptions of the following attributes:
|ATTRIBUTE TYPE||ATTRIBUTE VALUE|