Conservative SmartOS global-zone memory pressure guard with dry-run-first policy and SMF integration.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

18 lignes
800 B

  1. /* TEST ONLY: declaration sketch, NOT an illumos ABI/header implementation. */
  2. #include <stdint.h>
  3. typedef struct kstat_ctl kstat_ctl_t;
  4. typedef struct kstat { int ks_type; struct kstat *ks_next; char ks_module[31]; char ks_name[31]; } kstat_t;
  5. struct kstat_ctl { kstat_t *kc_chain; };
  6. typedef struct { int data_type; union { uint64_t ui64; int64_t i64; uint32_t ui32; int32_t i32; } value; } kstat_named_t;
  7. #define KSTAT_DATA_INT32 1
  8. #define KSTAT_DATA_UINT32 2
  9. #define KSTAT_DATA_INT64 3
  10. #define KSTAT_DATA_UINT64 4
  11. #define KSTAT_TYPE_NAMED 1
  12. kstat_ctl_t *kstat_open(void);
  13. int kstat_close(kstat_ctl_t *);
  14. int kstat_chain_update(kstat_ctl_t *);
  15. kstat_t *kstat_lookup(kstat_ctl_t *, char *, int, char *);
  16. int kstat_read(kstat_ctl_t *, kstat_t *, void *);
  17. void *kstat_data_lookup(kstat_t *, char *);