Re: [PATCH v2] Cygwin: Fix the address of myself
On Jul 25 19:59, Ken Brown wrote: > On 7/25/2019 9:37 AM, Corinna Vinschen wrote: > > On Jul 24 19:11, Ken Brown wrote: > >> On 7/24/2019 12:54 PM, Corinna Vinschen wrote: > >>> From: Corinna Vinschen > >>> > >>> v2: rephrase commit message > >>> > >>> Introducing an independent Cygwin PID introduced a regression: > >>> [...] > >>> This patch makes sure to set the handle to INVALID_HANDLE_VALUE again > >>> when creating a new process, so init knows that myself has to be created > >>> in the right spot. While at it, fix a potential uninitialized handle > >>> value in child_info_spawn::handle_spawn. > >>> > >>> Fixes: b5e1003722cb ("Cygwin: processes: use dedicated Cygwin PID rather > >>> than Windows PID") > >>> Fixes: 88605243a19b ("Cygwin: fix child getting another pid after > >>> spawnve") > >>> Signed-off-by: Corinna Vinschen > >>> [...] > >> > >> I'll be glad to take a close look at this as you asked. But I'm not > >> familiar > >> with this part of the code, so it will take me a little time. > >> > >> Ken > > > > Thanks! I accidentally pushed the patch a few minutes ago when I > > was actually just planning to push the ndbm.h patch. Anyway, I > > took the opportunity to create new snapshots with all patches from > > yesterday and today, so the getpgrp problems in GDB 8.1.1 and 8.2.1 > > should both be fixed there as well. > > > > I'd still be glad if the two of you could check if my patch makes > > sense as is. > > It looks fine to me, though I can't claim to have grasped all its > implications. > In any case, I've installed it and have done a few things that often catch > bugs > (e.g., building emacs and running its test suite), and there are no problems > so far. > > My next step will be to install the experimental pipe code that I posted in > https://cygwin.com/ml/cygwin-patches/2019-q2/msg00144.html to see if that > shakes > anything loose. > > Ken Great, thank you! Corinna -- Corinna Vinschen Cygwin Maintainer signature.asc Description: PGP signature
Re: [PATCH] Cygwin: Implement CPU_SET(3) macros
On Jul 25 14:15, Mark Geisert wrote: > Corinna Vinschen wrote: > > Hi Mark, > > > > On Jul 1 01:55, Mark Geisert wrote: > > > Corinna Vinschen wrote: > > > > On Jun 30 15:59, Mark Geisert wrote: > > > > > This patch supplies an implementation of the CPU_SET(3) processor > > > > > affinity macros as documented on the relevant Linux man page. > > > > > --- > > > > >winsup/cygwin/include/sys/cpuset.h | 62 > > > > > +++--- > > > > >winsup/cygwin/sched.cc | 8 ++-- > > > > >2 files changed, 60 insertions(+), 10 deletions(-) > > > > > [...] > > > > > +#define CPU_SETSIZE 1024 // maximum number of logical processors > > > > > tracked > > > > > +#define NCPUBITS (8 * sizeof (__cpu_mask)) // max size of > > > > > processor group > > > > > +#define CPU_GROUPMAX (CPU_SETSIZE / NCPUBITS) // maximum group > > > > > number > > > > > -#define __CPUELT(cpu) ((cpu) / __NCPUBITS) > > > > > -#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS)) > > > > > +#define CPU_WORD(cpu) ((cpu) / NCPUBITS) > > > > > +#define CPU_MASK(cpu) ((__cpu_mask) 1 << ((cpu) % NCPUBITS)) > > > > > > > > I wouldn't do that. Three problems: > > > > [...] > > > > There's also the request from Sebastian on the newlib list to > > > > consolidate the cpuset stuff from RTEMS and Cygwin into a single > > > > definition. > > > > [...] > > > I've also found that taskset isn't working properly on my build system > > > with > > > the new CPU_SET code, though my other testcases are. So even as > > > submitted, > > > and fixed per your comments here, there's a bit more to be done. > > > > > > ..mark > > > > any chance to pick this up again? > > Hi; yes, certainly. I'm back but ill. I hope it's nothing serious. Please make sure you're getting well before diving too deep into code again :) > It may be a week or so before I have > an update/fix. Top of my list of pending items that require concentration > ;-). > > ..mark Sounds good to me. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer signature.asc Description: PGP signature