diff options
| author | Paul Eggert | 2021-10-10 13:59:16 -0700 |
|---|---|---|
| committer | Paul Eggert | 2021-10-10 14:00:26 -0700 |
| commit | 96278de8ac2166c37925f2dfbc0eeb6d368142b9 (patch) | |
| tree | 566142705adf60d95c200aa188e51466d2504c94 /src/w32proc.c | |
| parent | 575e626105b506b008eb9b0a03bb27aeecee54d4 (diff) | |
| download | emacs-96278de8ac2166c37925f2dfbc0eeb6d368142b9.tar.gz emacs-96278de8ac2166c37925f2dfbc0eeb6d368142b9.zip | |
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.
Diffstat (limited to 'src/w32proc.c')
| -rw-r--r-- | src/w32proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/w32proc.c b/src/w32proc.c index 702ea122e65..3b7d92a2aa8 100644 --- a/src/w32proc.c +++ b/src/w32proc.c | |||
| @@ -3878,6 +3878,7 @@ w32_compare_strings (const char *s1, const char *s2, char *locname, | |||
| 3878 | return val - 2; | 3878 | return val - 2; |
| 3879 | } | 3879 | } |
| 3880 | 3880 | ||
| 3881 | /* FIXME: Remove, merging any of its special features into num-processors. */ | ||
| 3881 | DEFUN ("w32-get-nproc", Fw32_get_nproc, | 3882 | DEFUN ("w32-get-nproc", Fw32_get_nproc, |
| 3882 | Sw32_get_nproc, 0, 0, 0, | 3883 | Sw32_get_nproc, 0, 0, 0, |
| 3883 | doc: /* Return the number of system's processor execution units. */) | 3884 | doc: /* Return the number of system's processor execution units. */) |