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

개요

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

kstat2_create_with_template(9f)

Kernel Functions                               kstat2_create_with_template(9F)



NAME
       kstat2_create_with_template,  kstat2_lookup_template  - lookup a system
       template, create and initialize a new kstat using a template

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

       kstat2_template_t *kstat2_lookup_template(uint32_t tmpl_id);
       const kstat2_t *kstat2_create_with_template(
                 const char *ks_pseg[], uint32_t ks_npseg,
                 zoneid_t ks_zone, kstat2_template_t *ks_tmpl,
                 uint32_t ks_flags, kstat2_named_t *ks_data,
                 const char *ks_desc, kstat2_metaflag_t ks_mflags);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI)

PARAMETERS
       kstat2_lookup_template() function


       tmpl_id

           ID of the system template to be returned.




       kstat2_create_with_template() function


       ks_pseg

           The segments used to construct a path that uniquely identifies this
           kstat. For example, "unix", "cpu", "cpu_info", "1".


       ks_npseg

           The number of path segments in the array kstat_pseg.


       ks_zone

           The  ID  of  the zone in which this kstat is initially visible. The
           constant ALL_ZONES is used to make the kstat visible in all  zones,
           and  the constant, GLOBAL_ZONEID is used to make it visible only in
           the global zone. kstat2_zone_add(9F) function can be used  to  make
           the kstat visible in other zones.


       ks_tmpl

           The  pointer to the template data structure which is used to create
           and populate the data for this kstat.


       ks_flags

           A bit-field of flags for this kstat. For more information about the
           flags, see the kstat2_create(9F) man page.


       ks_data

           For  kstats  whose  data  is managed by the driver, this field must
           point to an appropriate name-value  pair  array  structure  in  the
           driver.  For  kstats  whose storage is managed by the kstats frame‐
           work, this field must be NULL.


       ks_desc

           A brief string describing the purpose of this kstat.


       ks_mflags

           Meta-flags for the kstat  as  a  whole.  Either  KSTAT2_MF_NONE  or
           KSTAT2_MF_STABLE


           KSTAT2_MF_NONE

               Indicates that this kstat has no meta-flags set.


           KSTAT2_MF_STABLE

               Indicates  that this kstat is considered stable and will not be
               removed from Solaris without prior notification.





DESCRIPTION
       The kstat2_lookup_template() function fetches the system template asso‐
       ciated  with  the  given  ID.  This  template  is passed to kstat2_cre‐
       ate_with_template() to create a kstat.


       The kstat2_create_with_template() function is used to allocate and ini‐
       tialize a kstat2 structure. The majority of the data required to create
       the kstat is provided in supplied template.


       After a successful call to kstat2_create_with_template()  function  the
       driver  should  set the ks2_update, ks2_private, and ks2_lock fields as
       needed.


       Once the kstat is completely initialized, the kstat2_install(9F)  func‐
       tion is used to make it accessible to the outside world.

RETURN VALUES
       The  kstat2_create_with_template() function returns a pointer to a tem‐
       plate or returns NULL if an invalid template ID is given.


       The kstat2_create_with_template() function returns  a  pointer  to  the
       allocated kstat or returns NULL upon failure.

CONTEXT
       kstat2_lookup_template()   and   kstat2_create_with_template()  can  be
       called from user or kernel context.

SEE ALSO
       kstat2_create(9F),       kstat2_install(9F),       kstat2_zone_add(9F),
       kstat2_zone_remove(9F),  kstat2(9S)   kstat2_md(9S),  kstat2_named(9S),
       kstat2_template(9S)



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