comparison src/getloadavg.c @ 647:b39c14581166

[xemacs-hg @ 2001-08-13 04:45:47 by ben] removal of unsigned, size_t, etc.
author ben
date Mon, 13 Aug 2001 04:46:48 +0000
parents abe6d1db359e
children 943eaba38521
comparison
equal deleted inserted replaced
646:00c54252fe4f 647:b39c14581166
672 672
673 desc.sd_next = 0; 673 desc.sd_next = 0;
674 desc.sd_subsys = SUBSYS_CPU; 674 desc.sd_subsys = SUBSYS_CPU;
675 desc.sd_type = CPUTYPE_CONFIG; 675 desc.sd_type = CPUTYPE_CONFIG;
676 desc.sd_addr = (char *) &conf; 676 desc.sd_addr = (char *) &conf;
677 desc.sd_size = sizeof conf; 677 desc.sd_size = sizeof (conf);
678 678
679 if (inq_stats (1, &desc)) 679 if (inq_stats (1, &desc))
680 return -1; 680 return -1;
681 681
682 c = 0; 682 c = 0;
683 for (i = 0; i < conf.config_maxclass; ++i) 683 for (i = 0; i < conf.config_maxclass; ++i)
684 { 684 {
685 struct class_stats stats; 685 struct class_stats stats;
686 memset ((char *) &stats, 0, sizeof stats); 686 memset ((char *) &stats, 0, sizeof (stats));
687 687
688 desc.sd_type = CPUTYPE_CLASS; 688 desc.sd_type = CPUTYPE_CLASS;
689 desc.sd_objid = i; 689 desc.sd_objid = i;
690 desc.sd_addr = (char *) &stats; 690 desc.sd_addr = (char *) &stats;
691 desc.sd_size = sizeof stats; 691 desc.sd_size = sizeof (stats);
692 692
693 if (inq_stats (1, &desc)) 693 if (inq_stats (1, &desc))
694 return -1; 694 return -1;
695 695
696 c += stats.class_numcpus; 696 c += stats.class_numcpus;