View | Details | Raw Unified | Return to bug 230330 | Differences between
and this patch

Collapse All | Expand All

(-)lib/libc/gen/sysconf.c (-1 / +6 lines)
Lines 586-592 yesno: Link Here
586
#endif
602
#endif
587
603
588
	case _SC_NPROCESSORS_CONF:
604
	case _SC_NPROCESSORS_CONF:
589
	case _SC_NPROCESSORS_ONLN:
590
		if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0)
605
		if (_elf_aux_info(AT_NCPUS, &value, sizeof(value)) == 0)
591
			return ((long)value);
606
			return ((long)value);
592
		mib[0] = CTL_HW;
607
		mib[0] = CTL_HW;
Lines 593-598 yesno: Link Here
593
		mib[1] = HW_NCPU;
608
		mib[1] = HW_NCPU;
594
		break;
609
		break;
595
610
611
	case _SC_NPROCESSORS_ONLN:
612
		len = sizeof(value);
613
		if (sysctlbyname("kern.smp.cpus", &value, &len, NULL, 0) == -1)
614
			return (-1);
615
		return ((long)value);
616
596
#ifdef _SC_PHYS_PAGES
617
#ifdef _SC_PHYS_PAGES
597
	case _SC_PHYS_PAGES:
618
	case _SC_PHYS_PAGES:
598
		len = sizeof(lvalue);
619
		len = sizeof(lvalue);
(-)sys/compat/linsysfs/linsysfs.c (-1 / +1 lines)
Lines 473-479 linsysfs_listcpus(struct pfs_node *dir) Link Here
473
	len += sizeof("cpu");
473
	len += sizeof("cpu");
474
	name = malloc(len, M_TEMP, M_WAITOK);
474
	name = malloc(len, M_TEMP, M_WAITOK);
475
475
476
	for (i = 0; i < mp_ncpus; ++i) {
476
	for (i = 0; i < smp_cpus; ++i) {
477
		/* /sys/devices/system/cpu/cpuX */
477
		/* /sys/devices/system/cpu/cpuX */
478
		sprintf(name, "cpu%d", i);
478
		sprintf(name, "cpu%d", i);
479
		cpu = pfs_create_dir(dir, name, NULL, NULL, NULL, 0);
479
		cpu = pfs_create_dir(dir, name, NULL, NULL, NULL, 0);

Return to bug 230330