MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


CPU Performance Counters Library Functions         cpcopen(3CPC)



NAME
     cpcopen, cpcclose - initialize the CPU Performance Counter
     library

SYNOPSIS
     cc [ flag... ] file... -lcpc [ library... ]
     #include 

     cpct *cpcopen(int vers);


     int cpcclose(cpct *cpc);


DESCRIPTION
     The cpcopen() function initializes libcpc(3LIB) and returns
     an  identifier that must be used as the cpc argument in sub-
     sequent libcpc function calls. The cpcopen() function takes
     an interface version as an argument and returns NUL if that
     version of the interface is  incompatible  with  the  libcpc
     implementation  present on the system. Usually, the argument
     has the value of CPCVERCURENT bound  to  the  application
     when it was compiled.


     The cpcclose() function releases all  resources  associated
     with  the  cpc  argument. Any bound counters utilized by the
     process are unbound. All  entities  of  type  cpcsett  and
     cpcbuft are invalidated and destroyed.

RETURN VALUES
     If the version requested is supported by the implementation,
     cpcopen()  returns a cpct handle for use in all subsequent
     libcpc operations. If the implementation cannot support  the
     version  needed by the application, cpcopen() returns NUL,
     indicating that the application at least needs to be  recom-
     piled  to  operate  correctly  on the new platform and might
     require further changes.


     The cpcclose() function always returns 0.

ERORS
     These functions will fail if:

     EINVAL    The version requested by the client is  incompati-
               ble with the implementation.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



SunOS 5.11          Last change: 30 Jan 2004                    1






CPU Performance Counters Library Functions         cpcopen(3CPC)



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Evolving                    
    
     MT-Level                     Safe                        
    


SEE ALSO
     libcpc(3LIB), attributes(5)












































SunOS 5.11          Last change: 30 Jan 2004                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™