/illumos-gate/usr/src/uts/common/io/usb/clients/usbser/usbser_keyspan/ |
H A D | keyspan_dsd.c | 1535 rval = usb_get_dev_data(ksp->ks_dip, &ksp->ks_dev_data, in keyspan_usb_register() 1538 ksp->ks_lh = in keyspan_usb_register() 1545 ksp->ks_def_pipe.pipe_ksp = ksp; in keyspan_usb_register() 1546 ksp->ks_def_pipe.pipe_lh = ksp->ks_lh; in keyspan_usb_register() 1558 ksp->ks_lh = NULL; in keyspan_usb_unregister() 1559 usb_client_detach(ksp->ks_dip, ksp->ks_dev_data); in keyspan_usb_unregister() 1658 ksp->ks_ports = kmem_zalloc(ksp->ks_dev_spec.port_cnt * in keyspan_attach_ports() 1664 kp->kp_ksp = ksp; in keyspan_attach_ports() 1769 usb_free_descr_tree(ksp->ks_dip, ksp->ks_dev_data); in keyspan_free_descr_tree() 1787 usb_unregister_event_cbs(ksp->ks_dip, ksp->ks_usb_events); in keyspan_unregister_events() [all …]
|
H A D | keyspan_pipe.c | 64 pipe->pipe_ksp = ksp; in keyspan_init_one_pipe() 256 keyspan_init_one_pipe(ksp, NULL, &ksp->ks_statin_pipe); in keyspan_init_pipes() 259 keyspan_init_one_pipe(ksp, NULL, &ksp->ks_ctrlout_pipe); in keyspan_init_pipes() 266 keyspan_init_one_pipe(ksp, &ksp->ks_ports[i], in keyspan_init_pipes() 271 keyspan_init_one_pipe(ksp, &ksp->ks_ports[i], in keyspan_init_pipes() 383 keyspan_init_one_pipe(ksp, NULL, &ksp->ks_statin_pipe); in keyspan_init_pipes_usa49wg() 389 keyspan_init_one_pipe(ksp, &ksp->ks_ports[i], in keyspan_init_pipes_usa49wg() 394 keyspan_init_one_pipe(ksp, &ksp->ks_ports[i], in keyspan_init_pipes_usa49wg() 581 rval = keyspan_open_one_pipe(ksp, &ksp->ks_ctrlout_pipe); in keyspan_open_dev_pipes_usa49() 589 rval = keyspan_open_one_pipe(ksp, &ksp->ks_statin_pipe); in keyspan_open_dev_pipes_usa49() [all …]
|
/illumos-gate/usr/src/lib/libkstat/common/ |
H A D | kstat.c | 58 while (ksp) { in kstat_chain_free() 61 free(ksp); in kstat_chain_free() 62 ksp = nksp; in kstat_chain_free() 109 if (ksp->ks_data == NULL && ksp->ks_data_size > 0) { in kstat_read() 110 kstat_zalloc(&ksp->ks_data, ksp->ks_data_size, 0); in kstat_read() 131 kstat_zalloc(&ksp->ks_data, ksp->ks_data_size, 1); in kstat_read() 138 (void) memcpy(data, ksp->ks_data, ksp->ks_data_size); in kstat_read() 174 if (ksp->ks_data == NULL && ksp->ks_data_size > 0) { in kstat_write() 175 kstat_zalloc(&ksp->ks_data, ksp->ks_data_size, 0); in kstat_write() 180 (void) memcpy(ksp->ks_data, data, ksp->ks_data_size); in kstat_write() [all …]
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | kstat_fr.c | 499 if (ksp) { in kstat_init() 510 if (ksp) { in kstat_init() 524 if (ksp) { in kstat_init() 531 if (ksp) { in kstat_init() 538 if (ksp) { in kstat_init() 546 if (ksp) { in kstat_init() 669 bcopy(buf, ksp->ks_data, ksp->ks_data_size); in default_kstat_snapshot() 686 bcopy(ksp->ks_data, buf, ksp->ks_data_size); in default_kstat_snapshot() 1097 ksp->ks_snaptime = ksp->ks_crtime; in kstat_create_zone() 1146 ksp->ks_module, ksp->ks_instance, ksp->ks_name); in kstat_install() [all …]
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | kstat.c | 90 if (ksp == NULL) { in read_kstat_data() 102 kstat_rele(ksp); in read_kstat_data() 121 kstat_rele(ksp); in read_kstat_data() 125 KSTAT_ENTER(ksp); in read_kstat_data() 127 KSTAT_EXIT(ksp); in read_kstat_data() 128 kstat_rele(ksp); in read_kstat_data() 161 KSTAT_EXIT(ksp); in read_kstat_data() 162 kstat_rele(ksp); in read_kstat_data() 451 kstat_rele(ksp); in write_kstat_data() 656 KSTAT_EXIT(ksp); in write_kstat_data() [all …]
|
/illumos-gate/usr/src/cmd/powertop/common/ |
H A D | battery.c | 116 kstat_t *ksp; in pt_battery_stat_snapshot() local 131 if (ksp == NULL) { in pt_battery_stat_snapshot() 136 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 154 if (ksp == NULL) { in pt_battery_stat_snapshot() 159 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 181 if (ksp == NULL) { in pt_battery_stat_snapshot() 186 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 203 if (ksp == NULL) { in pt_battery_stat_snapshot() 208 (void) kstat_read(kc, ksp, NULL); in pt_battery_stat_snapshot() 227 if (ksp == NULL) { in pt_battery_stat_snapshot() [all …]
|
H A D | turbo.c | 66 kstat_t *ksp; in pt_turbo_init() local 77 ksp = kstat_lookup(kc, "turbo", 0, NULL); in pt_turbo_init() 78 if (ksp == NULL) { in pt_turbo_init() 84 (void) kstat_read(kc, ksp, NULL); in pt_turbo_init() 86 knp = kstat_data_lookup(ksp, "turbo_supported"); in pt_turbo_init() 115 kstat_t *ksp; in pt_turbo_snapshot() local 125 ksp = kstat_lookup(kc, "turbo", g_cpu_table[cpu], NULL); in pt_turbo_snapshot() 126 if (ksp == NULL) { in pt_turbo_snapshot() 133 if (kstat_read(kc, ksp, NULL) == -1) { in pt_turbo_snapshot() 140 knp = kstat_data_lookup(ksp, "turbo_mcnt"); in pt_turbo_snapshot() [all …]
|
/illumos-gate/usr/src/cmd/kvmstat/ |
H A D | kvmstat.c | 90 for (i = 0; i < ksp->ks_ndata; i++) { in kstat_field_hint() 96 field->ksf_name, ksp->ks_name, ksp->ks_instance); in kstat_field_hint() 126 kstat_t *ksp; in kstat_instances_update() local 138 for (ksp = kcp->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in kstat_instances_update() 141 if (!interested(ksp)) in kstat_instances_update() 158 ksi->ksi_ksp = ksp; in kstat_instances_update() 172 ksi->ksi_ksp = ksp; in kstat_instances_update() 230 kstat_t *ksp = ksi->ksi_ksp; in kstat_instances_read() local 232 if (ksp == NULL) in kstat_instances_read() 340 interested(kstat_t *ksp) in interested() argument [all …]
|
/illumos-gate/usr/src/uts/common/io/softmac/ |
H A D | softmac_stat.c | 178 kstat_t *ksp; in softmac_hold_dev_kstat() local 187 if (ksp != NULL) { in softmac_hold_dev_kstat() 188 KSTAT_ENTER(ksp); in softmac_hold_dev_kstat() 196 return (ksp); in softmac_hold_dev_kstat() 199 KSTAT_EXIT(ksp); in softmac_hold_dev_kstat() 200 kstat_rele(ksp); in softmac_hold_dev_kstat() 208 KSTAT_EXIT(ksp); in softmac_rele_dev_kstat() 209 kstat_rele(ksp); in softmac_rele_dev_kstat() 228 for (i = 0, knp = KSTAT_NAMED_PTR(ksp); i < ksp->ks_ndata; i++, knp++) { in softmac_get_kstat() 271 kstat_t *ksp; in softmac_m_stat() local [all …]
|
/illumos-gate/usr/src/cmd/sa/ |
H A D | sadc.c | 323 kstat_t *ksp; in all_stat_init() local 369 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in all_stat_init() 380 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in all_stat_init() 395 ksp = kmem_cache_list[0]; in all_stat_init() 555 if (ksp == NULL) in safe_kstat_lookup() 560 return (ksp); in safe_kstat_lookup() 578 (char *)ksp->ks_data) / (ksp->ks_data_size / ksp->ks_ndata)); in safe_kstat_data_index() 599 kstat_t *ksp; in init_iodevs() local 610 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_iodevs() 623 iodev->ksp = ksp; in init_iodevs() [all …]
|
/illumos-gate/usr/src/cmd/stat/common/ |
H A D | acquire.c | 56 if (ksp == NULL) in kstat_lookup_read() 58 if (kstat_read(kc, ksp, NULL) == -1) in kstat_lookup_read() 60 return (ksp); in kstat_lookup_read() 80 kstat_t *ksp; in acquire_cpus() local 186 kstat_t *ksp; in acquire_intrs() local 194 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in acquire_intrs() 195 if (ksp->ks_type == KSTAT_TYPE_INTR) in acquire_intrs() 216 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in acquire_intrs() 225 ki = KSTAT_INTR_PTR(ksp); in acquire_intrs() 247 kstat_t *ksp; in acquire_sys() local [all …]
|
/illumos-gate/usr/src/uts/common/io/ena/ |
H A D | ena_stats.c | 118 if (ksp == NULL) { in ena_stat_device_basic_init() 124 ebs = ksp->ks_data; in ena_stat_device_basic_init() 194 if (ksp == NULL) { in ena_stat_device_extended_init() 200 ees = ksp->ks_data; in ena_stat_device_extended_init() 246 if (ksp == NULL) { in ena_stat_aenq_init() 252 ksp->ks_data = eas; in ena_stat_aenq_init() 278 kstat_t *ksp; in ena_stat_txq_init() local 289 if (ksp == NULL) { in ena_stat_txq_init() 295 ksp->ks_data = ets; in ena_stat_txq_init() 333 kstat_t *ksp; in ena_stat_rxq_init() local [all …]
|
/illumos-gate/usr/src/uts/common/io/mac/ |
H A D | mac_stat.c | 391 kstat_t *ksp; in i_mac_stat_create() local 407 return (ksp); in i_mac_stat_create() 443 kstat_t *ksp; in i_mac_rx_ring_stat_create() local 484 kstat_t *ksp; in i_mac_tx_ring_stat_create() local 536 kstat_t *ksp; in i_mac_tx_swlane_stat_create() local 594 kstat_t *ksp; in i_mac_rx_swlane_stat_create() local 662 kstat_t *ksp; in i_mac_rx_hwlane_stat_create() local 806 kstat_t *ksp; in i_mac_misc_stat_create() local 859 kstat_t *ksp; in i_mac_tx_hwlane_stat_create() local 924 kstat_t *ksp; in i_mac_rx_fanout_stat_create() local [all …]
|
/illumos-gate/usr/src/cmd/pools/poolstat/ |
H A D | sa_kstat.c | 120 ksp->ks_name, name, get_errstr()); in safe_kstat_data_lookup() 178 sdata_new(kstat_t *ksp) in sdata_new() argument 183 kstat_clone(ksp, &sdp->sd_nks, 0); in sdata_new() 208 kstat_t *ksp; in update_sdata_list() local 211 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in update_sdata_list() 212 if (strcmp(ksp->ks_module, module) == 0 && in update_sdata_list() 215 if (kstat_read(kc, ksp, NULL) == -1) { in update_sdata_list() 227 if (ksp->ks_instance == in update_sdata_list() 235 kstat_clone(ksp, &sdp->sd_nks, 1); in update_sdata_list() 245 list = sdata_new(ksp); in update_sdata_list() [all …]
|
/illumos-gate/usr/src/uts/common/syscall/ |
H A D | gid.c | 50 ksid_t ksid, *ksp; in setgid() local 60 ksp = &ksid; in setgid() 62 ksp = NULL; in setgid() 114 if (ksp != NULL) in setgid() 115 ksid_rele(ksp); in setgid() 159 ksp = &ksid; in setegid() 161 ksp = NULL; in setegid() 235 ksp = &ksid; in setregid() 237 ksp = NULL; in setregid() 295 if (ksp != NULL) in setregid() [all …]
|
H A D | uid.c | 53 ksid_t ksid, *ksp; in setuid() local 62 ksp = &ksid; in setuid() 64 ksp = NULL; in setuid() 149 if (ksp != NULL) in setuid() 150 ksid_rele(ksp); in setuid() 204 ksp = &ksid; in seteuid() 206 ksp = NULL; in seteuid() 251 if (ksp != NULL) in seteuid() 252 ksid_rele(ksp); in seteuid() 283 ksp = &ksid; in setreuid() [all …]
|
/illumos-gate/usr/src/lib/libdladm/common/ |
H A D | libdlstat.c | 76 kstat_t *ksp = NULL; in dladm_kstat_lookup() local 78 for (ksp = kcp->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in dladm_kstat_lookup() 83 return (ksp); in dladm_kstat_lookup() 181 kstat_t *ksp; in dladm_get_single_mac_stat() local 727 kstat_t *ksp; in i_query_legacy_stats() local 736 if (ksp != NULL) in i_query_legacy_stats() 901 kstat_t *ksp; in i_dlstat_get_idlist() local 916 for (ksp = kcp->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in i_dlstat_get_idlist() 930 kstat_t *ksp; in i_dlstat_query_stats() local 980 kstat_t *ksp; in i_dlstat_misc_stats() local [all …]
|
/illumos-gate/usr/src/cmd/power/ |
H A D | sysstat.c | 90 (ksp), (name)))->value.ui64) 194 kstat_t *ksp; in init_disks() local 205 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_disks() 206 if (ksp->ks_type != KSTAT_TYPE_IO || in init_disks() 219 disk->ks = ksp; in init_disks() 300 kstat_t *ksp; in cpu_stats_init() local 303 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init() 313 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in cpu_stats_init() 316 kstat_read(kc, ksp, NULL) != -1) in cpu_stats_init() 317 cpu_stats_list[ncpus++] = ksp; in cpu_stats_init() [all …]
|
/illumos-gate/usr/src/cmd/rpcsvc/ |
H A D | rstat_proc.c | 684 if (ksp == NULL) in safe_kstat_lookup() 689 return (ksp); in safe_kstat_lookup() 711 kstat_t *ksp; in system_stat_init() local 734 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) in system_stat_init() 743 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) in system_stat_init() 749 if ((ksp = kstat_lookup(kc, "cpu", ksp->ks_instance, in system_stat_init() 830 kstat_t *ksp; in init_disks() local 841 for (ksp = kc->kc_chain; ksp; ksp = ksp->ks_next) { in init_disks() 855 disk->ks = ksp; in init_disks() 917 kstat_t *ksp; in init_net() local [all …]
|
/illumos-gate/usr/src/uts/common/io/dls/ |
H A D | dls_stat.c | 62 dls_stat_update(kstat_t *ksp, dls_link_t *dlp, int rw) in dls_stat_update() argument 71 knp = (kstat_named_t *)ksp->ks_data; in dls_stat_update() 109 kstat_t *ksp; in dls_stat_create() local 113 if ((ksp = kstat_create_zone(module, instance, name, "net", in dls_stat_create() 118 ksp->ks_update = update; in dls_stat_create() 119 ksp->ks_private = private; in dls_stat_create() 121 knp = (kstat_named_t *)ksp->ks_data; in dls_stat_create() 130 kstat_install(ksp); in dls_stat_create() 131 *kspp = ksp; in dls_stat_create()
|
/illumos-gate/usr/src/cmd/fm/modules/sun4u/USII-io-diagnosis/ |
H A D | iod_main.c | 112 kstat_t *ksp; in iod_cpu_check_support() local 118 for (ksp = kc->kc_chain; ksp != NULL; ksp = ksp->ks_next) { in iod_cpu_check_support() 119 if (strcmp(ksp->ks_module, "cpu_info") != 0) in iod_cpu_check_support() 122 if (kstat_read(kc, ksp, NULL) == -1) { in iod_cpu_check_support() 127 for (kn = ksp->ks_data, i = 0; i < ksp->ks_ndata; i++, kn++) { in iod_cpu_check_support()
|
/illumos-gate/usr/src/uts/common/io/hxge/ |
H A D | hxge_kstats.c | 363 ch_name = ksp->ks_name; in hxge_tdc_stat_update() 423 ksp->ks_data)); in hxge_tdc_sys_stat_update() 452 ch_name = ksp->ks_name; in hxge_rdc_stat_update() 508 ksp->ks_data)); in hxge_rdc_sys_stat_update() 630 kstat_t *ksp; in hxge_setup_local_kstat() local 636 if (ksp == NULL) in hxge_setup_local_kstat() 641 knp = ksp->ks_data; in hxge_setup_local_kstat() 647 kstat_install(ksp); in hxge_setup_local_kstat() 649 return (ksp); in hxge_setup_local_kstat() 655 struct kstat *ksp; in hxge_setup_kstats() local [all …]
|
/illumos-gate/usr/src/uts/common/fs/hsfs/ |
H A D | hsfs_subr.c | 348 hsfs_kstats_update(kstat_t *ksp, int flag) in hsfs_kstats_update() argument 362 fsp = ksp->ks_private; in hsfs_kstats_update() 363 knp = ksp->ks_data; in hsfs_kstats_update() 397 kstat_t *ksp; in hsfs_setup_named_kstats() local 406 if (ksp == NULL) in hsfs_setup_named_kstats() 410 ksp->ks_private = fsp; in hsfs_setup_named_kstats() 411 ksp->ks_update = update; in hsfs_setup_named_kstats() 412 ksp->ks_data_size += strlen(mntpt) + 1; in hsfs_setup_named_kstats() 413 knp = ksp->ks_data; in hsfs_setup_named_kstats() 422 kstat_install(ksp); in hsfs_setup_named_kstats() [all …]
|
/illumos-gate/usr/src/uts/common/io/ib/ibtl/ |
H A D | ibtl_impl.c | 1195 ksp, rw); in ibtl_kstat_stats_update() 1205 pks = ksp->ks_private; in ibtl_kstat_stats_update() 1224 struct kstat *ksp; in ibtl_kstat_stats_create() local 1240 if (ksp == NULL) { in ibtl_kstat_stats_create() 1252 ksp->ks_private = pks; in ibtl_kstat_stats_create() 1256 kstat_install(ksp); in ibtl_kstat_stats_create() 1274 ksp, rw); in ibtl_kstat_pkeys_update() 1285 pks = ksp->ks_private; in ibtl_kstat_pkeys_update() 1315 struct kstat *ksp; in ibtl_kstat_pkeys_create() local 1331 if (ksp == NULL) { in ibtl_kstat_pkeys_create() [all …]
|
/illumos-gate/usr/src/uts/sun4u/lw8/io/ |
H A D | sgenv.c | 638 kstat_t *ksp; in sgenv_add_kstats() local 649 if (ksp != NULL) { in sgenv_add_kstats() 676 if (ksp != NULL) { in sgenv_add_kstats() 701 if (ksp != NULL) { in sgenv_add_kstats() 725 kstat_t *ksp; in sgenv_remove_kstats() local 728 if (ksp != NULL) { in sgenv_remove_kstats() 730 kstat_delete(ksp); in sgenv_remove_kstats() 734 if (ksp != NULL) { in sgenv_remove_kstats() 738 kstat_delete(ksp); in sgenv_remove_kstats() 742 if (ksp != NULL) { in sgenv_remove_kstats() [all …]
|