Solaris::Lgrp Perl module

This Perl module provides a Perl interface to the locality group (lgroup) APIs found in liblgrp(3LIB).  Thus, this interface provides a way to traverse the lgroup hierarchy, discover its contents and characteristics, and set a thread's affinity for an lgroup.

The module gives access to various constants and functions defined in
<sys/lgrp_user.h> header file. It provides both the procedural and object
interface to the library. The procedural interface requires (in most cases)
passing a transparent cookie around. The object interface hides all the cookie
manipulations from the user.

Functions returning scalar value indicate error by returning undef. The
caller may examine the $! variable to get the errno value.

Functions returning list value return the number of elements in the list when
called in scalar context. In case of error the empty list is return in the array
context and undef is returned in the scalar context.

Simple example:

    use Solaris::Lgrp qw(:ALL);
    my $l = Solaris::Lgrp->new();
    my $home = l->home(P_PID, $$);

The module is also available on CPAN.

All the code above is provided under the rems of the OpenSolaris CDDL License.

Issues

  • Remove duplication of man page descriptions for liblgrp APIs, refer to them instead, and highlight what's different about Perl interface instead

Comments

Please send your comments and suggestions to the discussion forum.

last modified by admin on 2009/10/26 12:29
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.