diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-12-19 19:52:56 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-12-19 20:08:18 +0100 |
commit | 363357c023ce01e936bdaedf0f479292a8fa4e0f (patch) | |
tree | 08de2b7535a4676a98edba1808969f1fee72f60e | |
parent | 67bef16f7edf8642366ff55399bf9cf007c66d52 (diff) | |
download | newlib-github/master.zip newlib-github/master.tar.gz newlib-github/master.tar.bz2 |
Cygwin: pinfo: raise MAX_PID to 4194304HEADgithub/mastergithub/mainmastermain
Reportedly, the maximum pid of 65536 is much too small in bigger
environments. Raise the maximum PID to 4194304, whihc is the maximum
pid on Linux (PID_MAX_LIMIT defined in include/linux/threads.h).
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r-- | winsup/cygwin/local_includes/pinfo.h | 2 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/release/3.6.0 | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/local_includes/pinfo.h b/winsup/cygwin/local_includes/pinfo.h index be5d530..4de0f80 100644 --- a/winsup/cygwin/local_includes/pinfo.h +++ b/winsup/cygwin/local_includes/pinfo.h @@ -223,7 +223,7 @@ private: DWORD status_exit (DWORD); }; -#define MAX_PID 65536 +#define MAX_PID 4194304 #define ISSTATE(p, f) (!!((p)->process_state & f)) #define NOTSTATE(p, f) (!((p)->process_state & f)) diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index fecf76e..1f26a3c 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -239,7 +239,7 @@ pinfo::exit (DWORD n) } # undef self -/* Return next free Cygwin PID between 2 and 65535, round-robin. Each new +/* Return next free Cygwin PID between 2 and MAX_PID, round-robin. Each new PID is checked that it doesn't collide with an existing PID. For that, just check if the "cygpid.PID" section exists. */ pid_t diff --git a/winsup/cygwin/release/3.6.0 b/winsup/cygwin/release/3.6.0 index 47c19a8..4b76049 100644 --- a/winsup/cygwin/release/3.6.0 +++ b/winsup/cygwin/release/3.6.0 @@ -74,3 +74,7 @@ What changed: '(18) priority' is now set to the negated sched_policy minus one. If SCHED_IDLE is selected, this field is set to 39. The '(19) nice' field is now set to the originally requested nice value. + +- Raise maximum pid from 65536 to 4194304 to account for scenarios + with lots of CPUs and lots of tasks. + Addresses: https://cygwin.com/pipermail/cygwin/2024-December/256927.html |