emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] support for accessing CPU/core count (processor-count)


From: Arthur Miller
Subject: Re: [PATCH] support for accessing CPU/core count (processor-count)
Date: Sun, 10 Oct 2021 20:13:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Andreas Schwab <schwab@linux-m68k.org> writes:

> On Okt 10 2021, Arthur Miller wrote:
>
>> Andreas Schwab <schwab@linux-m68k.org> writes:
>>
>>> On Okt 10 2021, Arthur Miller wrote:
>>>
>>>> Does it differ between kernel versions or in which way is it architecture
>>>> dependent on Linux kernel? I suggested this only for gnu/Linux.
>>>
>>> Every architecture is different.  Why reinventing the wheel if the
>>> standard library has already worked out all the details?
>>>
>> ? Which standard library? C? Or what?
>>
>> I think there is some missunderstanding going on here. I didn't oppose to the
>> OPs idea with patch; I just said it would be more practical to implement it 
>> in
>> Lisp than in C.
>>
>> I gave him /proc/cpuinfo for gnu/Linux
>
> That is not portable.  It is much easier to let sysconf do the heavy
> lifting, instead of reimplementing it.

We seem to be talking past each other. I don't see why would want this as a C
primitive.

Sysconf is portable only on posix systems. It covers linux and *bsd kernels, but
you still have windows left, and some hypotetical future os.

I think it is better to implement it as a Lisp function, as Andrea did in native
comp. Less to maintain and don't need to be recompiled if some future non-posix
system need to be added.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]