summaryrefslogtreecommitdiff
path: root/src/w32.h
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2021-03-07 15:32:55 +0200
committerEli Zaretskii <eliz@gnu.org>2021-03-07 15:32:55 +0200
commit619f66f423c76d94b2bca728f9c22b536e909108 (patch)
treeecdea436c993f75d73b325c7552937a223365d80 /src/w32.h
parent99638d128ee07fa35525ac47217f68dd518e9175 (diff)
downloademacs-619f66f423c76d94b2bca728f9c22b536e909108.tar.gz
Use MS-Windows system APIs to get number of processors
* lisp/emacs-lisp/comp.el: Use 'w32-get-nproc' instead of the environment variable NUMBER_OF_PROCESSORS. * src/w32proc.c (Fw32_get_nproc): New primitive. * src/w32.c (w32_get_nproc): New function. (sample_system_load): Call w32_get_nproc to initialize the number of processors on this system. * src/w32.h (w32_get_nproc): Add prototype.
Diffstat (limited to 'src/w32.h')
-rw-r--r--src/w32.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/w32.h b/src/w32.h
index 3f8eb250cc1..a382dbe791a 100644
--- a/src/w32.h
+++ b/src/w32.h
@@ -233,6 +233,9 @@ extern int w32_memory_info (unsigned long long *, unsigned long long *,
/* Compare 2 UTF-8 strings in locale-dependent fashion. */
extern int w32_compare_strings (const char *, const char *, char *, int);
+/* Return the number of processor execution units on this system. */
+extern unsigned w32_get_nproc (void);
+
/* Return a cryptographically secure seed for PRNG. */
extern int w32_init_random (void *, ptrdiff_t);