]> git.eshelyaron.com Git - emacs.git/commit
New function num-processors
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 10 Oct 2021 20:59:16 +0000 (13:59 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 10 Oct 2021 21:00:26 +0000 (14:00 -0700)
commit96278de8ac2166c37925f2dfbc0eeb6d368142b9
tree566142705adf60d95c200aa188e51466d2504c94
parent575e626105b506b008eb9b0a03bb27aeecee54d4
New function num-processors

This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
12 files changed:
admin/merge-gnulib
doc/lispref/processes.texi
etc/NEWS
lib/gnulib.mk.in
lib/nproc.c [new file with mode: 0644]
lib/nproc.h [new file with mode: 0644]
lisp/emacs-lisp/comp.el
m4/gnulib-comp.m4
m4/nproc.m4 [new file with mode: 0644]
src/process.c
src/w32proc.c
test/src/process-tests.el