Initializing the Locality Group Interface

Applications must call the lgrp_init() function to use the APIs for traversing the lgroup hierarchy and to discover the contents of the lgroup hierarchy. Call to the lgrp_init() function gives the application a consistent snapshot of the lgroup hierarchy. The application developer can specify whether the snapshot must contain only the resources that are available to the calling thread or the resources that are available to the operating system.

The lgrp_init() function returns a cookie that is used for the following tasks:

  • Traversing the lgroup hierarchy

  • Determining the contents of an lgroup

  • Determining whether the snapshot is current

For more information, see the lgrp_init(3LGRP) man page.