svn commit: r362705 - head/bin/ps

Piotr P. Stefaniak pstef at freebsd.org
Sat Jun 27 19:29:32 UTC 2020


On 2020-06-27 22:21:02, Konstantin Belousov wrote:
>On Sat, Jun 27, 2020 at 07:09:33PM +0000, Piotr Pawel Stefaniak wrote:
>> Author: pstef

>> @@ -1454,6 +1457,18 @@ pidmax_init(void)
>>  		xo_warn("unable to read kern.pid_max");
>>  		pid_max = 99999;
>>  	}
>> +}
>> +
>> +static void
>> +smp_init(void)
>> +{
>> +	size_t size;
>> +
>> +	size = sizeof(smp);
>> +	if ((sysctlbyname("machdep.smp_active", &smp, &size, NULL, 0) != 0 &&
>There is no such sysctl machdep.smp_active, and it does not make sense to
>call it (even if it existed in some ancient FreeBSD version, I am not sure).

top(1) does that.

>> +		sysctlbyname("kern.smp.active", &smp, &size, NULL, 0) != 0) ||
>> +		size != sizeof(smp))
>The indent on this and previous lines is wrong.
>
>> +		smp = 0;
>>  }
>That said, I do not see why do you need to check this kind of configuration
>at all, on UP we return CPU 0 for all threads.

I'll remove it.


More information about the svn-src-all mailing list