kstat2_install(9f) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

kstat2_install(9f)

kstat2_install(9F)             Kernel Functions             kstat2_install(9F)



NAME
       kstat2_install - add a fully initialized kstat to the system

SYNOPSIS
       #include <sys/types.h>
       #include <sys/kstat2.h>

       void kstat2_install(kstat2_t *ksp);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI)

PARAMETERS
       ksp    Pointer to a fully initialized kstat2(9S) structure.



DESCRIPTION
       kstat2_install()  function  is used in conjunction with kstat2_create()
       function to allocate and initialize a kstat2 structure.


       After a successful call to kstat2_create() function,  the  driver  must
       perform  any necessary initialization of the data section. The provider
       might also set the ks2_update, ks2_private, and ks2_lock fields if nec‐
       essary.  These fields should be set before kstat2_install() function is
       called.


       Once the kstat is completely initialized, kstat2_install  marks  it  as
       valid and you may start to access its data.

RETURN VALUES
       None

CONTEXT
       The  kstat2_install()  function  can be called from user or kernel con‐
       text.

EXAMPLES
       Example 1 Allocating and Initializing a kstat Structure



       The method for allocating and initializing a kstat structure is  gener‐
       ally as follows:



         kstat2_t *ksp;
         ksp = kstat2_create(pseg, npseg, zoneid,
             &data, ndata, flags, md);
         if (ksp != NULL) {
              /* ... provider initialization, if necessary */
              kstat2_install(ksp);
         }



SEE ALSO
       kstat2_create(9F), kstat2_create_histogram(9F), kstat2_create_with_tem‐
       plate(9F),        kstat2_delete(9F),        kstat2_lookup_template(9F),
       kstat2_nv_init(9F), kstat2(9S), kstat2_named(9S)



Oracle Solaris 11.4               15 Jul 2015               kstat2_install(9F)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3