[PATCH] Cygwin: Update search.h functions for POSIX.1-2024

2025-05-01 Thread Mark Geisert
Reported-by: Collin Funk Addresses: https://cygwin.com/pipermail/cygwin/2025-April/258032.html Signed-off-by: Mark Geisert Fixes: ec98d19a08c2 "* wininfo.h (wininfo::timer_active): Delete." --- winsup/cygwin/include/search.h | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-)

Re: Use udis86 to walk x64 machine code in find_fast_cwd_pointer

2025-03-18 Thread Mark Geisert
27;t be so bad, would it? I don't remember offhand if Closing/Freeing a DLL reclaims the address space or not. If it does, putting the code in a tiny DLL for dynamic loading could work. Just spitballing here.. ignore if unworkable or too gross. ..mark

Re: [PATCH] Cygwin: Carry process affinity through to result

2025-03-18 Thread Mark Geisert
Hi Corinna, On 3/17/2025 2:18 AM, Corinna Vinschen wrote: On Mar 16 13:55, Mark Geisert wrote: On 3/16/2025 7:09 AM, Christian Franke wrote: Mark Geisert wrote: [...] [..blah blah..] So, v2 patch incoming shortly. Comments from other folks welcome. Only one: Thanks for looking into this

[PATCH v2] Cygwin: Carry process affinity through to result

2025-03-18 Thread Mark Geisert
257616.html Signed-off-by: Mark Geisert Fixes: 641ecb07533e ("Cygwin: Implement sched_[gs]etaffinity()") --- winsup/cygwin/release/3.6.0 | 4 winsup/cygwin/sched.cc | 11 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/release/3.6.0

Re: [PATCH] Cygwin: Carry process affinity through to result

2025-03-16 Thread Mark Geisert
On 3/16/2025 7:09 AM, Christian Franke wrote: Mark Geisert wrote: [...] Could only test the single cpu group (aka single physical cpu) case which is the most common, I guess. Works as expected: $ uname -r 3.6.0-dev-440-g5ec497dc80bc-dirty.x86_64 $ grep '^model name' /proc/cpui

[PATCH] Cygwin: Carry process affinity through to result

2025-03-16 Thread Mark Geisert
rch/257616.html Signed-off-by: Mark Geisert Fixes: 641ecb07533e ("Cygwin: Implement sched_[gs]etaffinity()") --- winsup/cygwin/sched.cc | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index 2f4fbc31a..ce1e94345 1

[PATCH v3] Cygwin: Add spawn family of functions to docs

2025-02-26 Thread Mark Geisert
In the doc tree, add a new section "Other system interfaces[...]" that lists the spawn family of functions, most of the exposed cygwin internal functions that a user might have use for, and some other functions duplicating Windows or DOS interfaces that might have some utility. --- winsup/doc/pos

[PATCH v2] Cygwin: Add spawn family of functions to docs

2025-02-25 Thread Mark Geisert
In the doc tree, add a new section "Other system interfaces[...]" that lists the spawn family of functions, most of the exposed cygwin internal functions that a user might have use for, and some other functions duplicating Windows or DOS interfaces that might have some utility. --- winsup/doc/pos

Re: [PATCH] Cygwin: Add spawn family of functions to docs

2025-02-24 Thread Mark Geisert
Hi Corinna, On 2/24/2025 3:58 AM, Corinna Vinschen wrote: On Feb 17 11:22, Corinna Vinschen wrote: On Feb 16 13:46, Mark Geisert wrote: In the doc tree, change the title of section "Other UNIX system interfaces..." to "Other system interfaces...". Add the spawn family

[PATCH] Cygwin: Add spawn family of functions to docs

2025-02-16 Thread Mark Geisert
In the doc tree, change the title of section "Other UNIX system interfaces..." to "Other system interfaces...". Add the spawn family of functions noting their origin as Windows. The title change seems warranted as neither the spawn family of functions nor the listed clock_setres() function origin

[PATCH v3] Cygwin: Minor updates to load average calculations

2025-01-20 Thread Mark Geisert
le locations of the former and treat the missing latter as always reporting 0.0. A release note is added for 3.5.6. Reported-by: Mark Liam Brown Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html Signed-off-by: Mark Geisert Fixes: 4dc982ddf60b (Cygwin: loadavg: improve debugg

[PATCH v2] Cygwin: Add fd validation where needed in mq_* functions

2025-01-19 Thread Mark Geisert
Validate the fd returned by cygheap_getfd operating on given mqd. A release note is provided for 3.5.6. Reported-by: Christian Franke Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257090.html Signed-off-by: Mark Geisert Fixes: 46f3b0ce85a9 (Cygwin: POSIX msg queues: move all mq_

Re: [PATCH] Cygwin: add fd validation to mq_* functions

2025-01-15 Thread mark
I believe a positive but nonexistent fd passed to cygheap_getfd results in a -1, so that case should be covered by this patch. However I botched the coding for mq_close. That fix plus anything else needed per reviews will appear as a v2. Thanks & Regards, ..mark Jan 15, 2025 3:35:4

[PATCH] Cygwin: add fd validation to mq_* functions

2025-01-15 Thread Mark Geisert
Validate the fd returned by cygheap_getfd operating on given mqd. Reported-by: Christian Franke Addresses: https://cygwin.com/pipermail/cygwin/2025-January/257090.html Signed-off-by: Mark Geisert Fixes: 46f3b0ce85a9 (Cygwin: POSIX msg queues: move all mq_* functionality into fhandler_mqueue

Re: [PATCH v2] Cygwin: New tool loadavg to maintain load averages

2024-11-24 Thread Mark Geisert
On 11/19/2024 1:17 AM, Corinna Vinschen wrote: On Nov 18 20:58, Jon Turney wrote: On 13/11/2024 06:21, Mark Geisert wrote: This program provides an up-to-the-moment load average measurement. The user can take 1 sample, or obtain the average of N samples by number or Sorry about the

Re: [PATCH v2] Cygwin: Minor updates to load average calculations

2024-11-21 Thread Mark Geisert
On 11/21/2024 2:35 AM, Mark Geisert hallucinated: I used SysInternals tool [I don't remember] to explore the namespace. Turns out it was actually MSDN sample code under the topic "Browsing Performance Counters&

Re: [PATCH v2] Cygwin: Minor updates to load average calculations

2024-11-21 Thread Mark Geisert
Hi Jon, On 11/18/2024 12:58 PM, Jon Turney wrote: On 13/11/2024 06:03, Mark Geisert wrote: Thanks very much for looking into this problem. Sorry about the inordinate time it's take for me to look at this. No worries, I understand. Commentary wording adjusted to say ProcessorQueueL

Re: [PATCH v2] Cygwin: Minor updates to load average calculations

2024-11-21 Thread Mark Geisert
On 11/21/2024 1:34 AM, Corinna Vinschen wrote: On Nov 21 01:12, Mark Geisert wrote: Hi Corinna, On 11/18/2024 4:22 AM, Corinna Vinschen wrote: Hi Mark, Jon, would you mind to take a look, please? I appreciate the additional eyes, thanks. This looks good to me, just one question... On

Re: [PATCH v2] Cygwin: New tool loadavg to maintain load averages

2024-11-21 Thread Mark Geisert
Hi Jon, On 11/18/2024 12:58 PM, Jon Turney wrote: On 13/11/2024 06:21, Mark Geisert wrote: This program provides an up-to-the-moment load average measurement.  The user can take 1 sample, or obtain the average of N samples by number or Sorry about the inordinate time it's take for me to

Re: [PATCH v2] Cygwin: New tool loadavg to maintain load averages

2024-11-21 Thread Mark Geisert
On 11/18/2024 4:26 AM, Corinna Vinschen wrote: Hi Mark, Not being a bugfix, this patch should go into the main branch and only update release/3.6.0. Right, OK. v3 will have the correction. I was erroneously considering all the load average mods to be one ball of wax, so to speak. Thanks

Re: [PATCH v2] Cygwin: Minor updates to load average calculations

2024-11-21 Thread Mark Geisert
Hi Corinna, On 11/18/2024 4:22 AM, Corinna Vinschen wrote: Hi Mark, Jon, would you mind to take a look, please? I appreciate the additional eyes, thanks. This looks good to me, just one question... On Nov 12 22:03, Mark Geisert wrote: [...] +/* Delay a short time so PdhCQD in

[PATCH] Add libaio to SUBLIBS built for Cygwin

2024-11-19 Thread Mark Geisert
Provide libaio.a for those projects (such as stress-ng) checking for POSIX aio support by looking for this library at configure time. A release note is provided for Cygwin 3.6.0. Signed-off-by: Mark Geisert Fixes: N/A (new code) --- winsup/cygwin/Makefile.am | 6 +- winsup/cygwin/release

[PATCH v2] Cygwin: New tool loadavg to maintain load averages

2024-11-12 Thread Mark Geisert
nable load average calculation over time. A release note is provided for Cygwin 3.5.5. Documentation for doc/utils.xml is pending. Reported-by: Mark Liam Brown Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html Signed-off-by: Mark Geisert Fixes: N/A (new code) --- winsup/cygw

[PATCH v2] Cygwin: Minor updates to load average calculations

2024-11-12 Thread Mark Geisert
ounter and is missing the 'Processor Queue Length' counter entirely. Code is changed to support both possible locations of the former and treat the latter as always reporting 0.0. Reported-by: Mark Liam Brown Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html Signed-

[PATCH v4] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-11 Thread Mark Geisert
-in thread id rather than an indirect thread pointer as before. (It used to be "pthread_t *thread", i.e., class pthread **.) The release note for Cygwin 3.5.5 is updated. Reported-by: Christian Franke Addresses: https://cygwin.com/pipermail/cygwin/2024-September/256439.html Signed-of

When submitting a bugfix patch *initially*

2024-11-07 Thread Mark Geisert
backported does the bugfix description move from version/3.6.0 to version/3.5.5 or does it exist in both version files? Thanks much, ..mark

Re: [PATCH v3] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-07 Thread Mark Geisert
Hi Corinna, On 11/7/2024 3:13 AM, Corinna Vinschen wrote: Hi Mark, On Nov 6 23:29, Mark Geisert wrote: Change the first parameter of pthread_sigqueue() to be a thread id rather than a thread pointer. The change is to match the Linux implementation of this function. The user-visible function

[PATCH v3] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-06 Thread Mark Geisert
ygwin/2024-September/256439.html Signed-off-by: Mark Geisert Fixes: 2041af1a535a (cygwin.din (pthread_sigqueue): Export.) --- winsup/cygwin/include/cygwin/version.h | 3 ++- winsup/cygwin/include/pthread.h| 2 +- winsup/cygwin/release/3.5.5| 3 +++ winsup/cygwin/thread.cc

Re: [PATCH v2] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-05 Thread Mark Geisert
for release/3.5.5). Maybe you can enable the ifndef'ed out test with this change... Mark, are you going to prepare a v3? Will do, in the next day or two. .mark

Re: [PATCH v2] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-03 Thread Mark Geisert
Hi Christian, On 11/3/2024 3:15 AM, Christian Franke wrote: Mark Geisert wrote: Hi Corinna, On 10/22/2024 7:45 AM, Corinna Vinschen wrote: [...] Even if the old prototype was wrong, we probably have to keep it for backward compatibility.  As unlikely as it seems, but there may be binaries

Re: [PATCH v2] Cygwin: Change pthread_sigqueue() to accept thread id

2024-11-03 Thread Mark Geisert
Hi Corinna, On 10/22/2024 7:45 AM, Corinna Vinschen wrote: Hi Mark, Thanks for looking into this. On Sep 19 02:13, Mark Geisert wrote: Change the first parameter of pthread_sigqueue() to be a thread id rather than a thread pointer. The change is to match the Linux implementation of this

Re: [PATCH] Cygwin: Minor updates to load average calculations

2024-11-03 Thread Mark Geisert
Hi Corinna, On 10/22/2024 7:57 AM, Corinna Vinschen wrote: Hi Mark, On Oct 8 22:19, Mark Geisert wrote: [...] Some older versions of Windows we still support have a different Can you be a bit more specific here, i.e., which Windows versions? FTR the only example I have is one of my

Re: [PATCH] Cygwin: Minor updates to load average calculations

2024-10-09 Thread Mark Geisert
Hi Brian, On 10/9/2024 9:36 AM, Brian Inglis wrote: Clarity suggestions and questions that could perhaps benefit from more comment: On 2024-10-08 23:19, Mark Geisert wrote: [...]     The number of running processes is estimated as (NumberOfProcessors) * (% -  Processor Time).  The number

[PATCH] Cygwin: New tool loadavg to maintain load averages

2024-10-08 Thread Mark Geisert
nable load average calculation over time. Reported-by: Mark Liam Brown Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html Signed-off-by: Mark Geisert Fixes: N/A (new code) --- winsup/utils/Makefile.am | 2 + winsup/utils/loadavg.c | 366

[PATCH] Cygwin: Minor updates to load average calculations

2024-10-08 Thread Mark Geisert
27; counter entirely. Code is changed to support both possible locations of the former and treat the latter as always reporting 0.0. Reported-by: Mark Liam Brown Addresses: https://cygwin.com/pipermail/cygwin/2024-August/256361.html Signed-off-by: Mark Geisert Fixes: 4dc982ddf60b (Cygwin: loadavg:

[PATCH v2] Cygwin: Change pthread_sigqueue() to accept thread id

2024-09-19 Thread Mark Geisert
ses: https://cygwin.com/pipermail/cygwin/2024-September/256439.html Signed-off-by: Mark Geisert Fixes: 2041af1a535a (cygwin.din (pthread_sigqueue): Export.) --- winsup/cygwin/include/pthread.h | 2 +- winsup/cygwin/local_includes/thread.h | 18 ++ winsup/cygwin/rel

[PATCH] Cygwin: Fix pthread_sigqueue to accept thread id

2024-09-15 Thread Mark Geisert
Change the prototype for pthread_sigqueue() so the first parameter is a thread id. Change the code of the function to deal with the changed parameter. This involves adding cheap iteration to the list of threads. [I have questions about the code (see below) so there will be a v2 patch with these pa

[PATCH] cygwin-htdocs: Upgrade 32-bit note to Q and A

2024-06-09 Thread Mark Geisert
Upgrade the note about 32-bit Cygwin to a full question and answer(s). Also close a couple of HTML tags that need it. --- install.html | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/install.html b/install.html index cdb9948b..c948e647 100755 --- a/inst

[PATCH v2] Fix profiler error() definition and usage

2023-11-14 Thread Mark Geisert
dows error number displays Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler") Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump") Signed-off-by: Mark Geisert --- winsup/cygwin/release/3.4.10 | 3 +++ winsup/utils/gmondump.c | 8 --- win

Re: [PATCH] Cygwin: Fix profiler error() definition and usage

2023-11-14 Thread Mark Geisert
Hi Corinna, On Mon, 13 Nov 2023, Corinna Vinschen wrote: On Nov 13 01:46, Mark Geisert wrote: Minor updates to profiler and gmondump, which share some code: - fix operation of error() so it actually works as intended - resize 4K-size auto buffer reservations to BUFSIZ (==1K) - remove trailing

[PATCH] Cygwin: Fix profiler error() definition and usage

2023-11-13 Thread Mark Geisert
dows error number displays Fixes: 9887fb27f6126 ("Cygwin: New tool: profiler") Fixes: 087a3d76d7335 ("Cygwin: New tool: gmondump") Signed-off-by: Mark Geisert --- winsup/utils/gmondump.c | 8 --- winsup/utils/profiler.cc | 46 +---

Re: Which git hash to supply on Fixes: line -- never mind

2023-11-13 Thread Mark Geisert
On Sun, 12 Nov 2023, Mark Geisert wrote: Hi folks, I want to submit a patch that fixes 'profiler'. The Fixes: line of the patch commentary should reference the original addition of profiler to the Cygwin source tree. Using the gitweb interface, the commit display of profile

Which git hash to supply on Fixes: line

2023-11-12 Thread Mark Geisert
Hi folks, I want to submit a patch that fixes 'profiler'. The Fixes: line of the patch commentary should reference the original addition of profiler to the Cygwin source tree. Using the gitweb interface, the commit display of profiler.cc shows: authorMark Geisert 2021-07-1

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-08 Thread Mark Geisert
Mark Geisert wrote, and then wrote again: Corinna Vinschen wrote: On Sep  7 22:36, Mark Geisert wrote: Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Ma

Re: [PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-08 Thread Mark Geisert
Corinna Vinschen wrote: On Sep 7 22:36, Mark Geisert wrote: Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Mark Geisert Fixes: c6cfc99648d6 (Cygwin: sy

[PATCH] Cygwin: Add relnote to 3.4.10 release file

2023-09-08 Thread Mark Geisert
Document the most recent update to include/sys/cpuset.h. --- winsup/cygwin/release/3.4.10 | 5 + 1 file changed, 5 insertions(+) create mode 100644 winsup/cygwin/release/3.4.10 diff --git a/winsup/cygwin/release/3.4.10 b/winsup/cygwin/release/3.4.10 new file mode 100644 index 0..f34

[PATCH] Cygwin: Fix __cpuset_zero_s prototype

2023-09-07 Thread Mark Geisert
Add a missing "void" to the prototype for __cpuset_zero_s(). Reported-by: Marco Mason Addresses: https://cygwin.com/pipermail/cygwin/2023-September/254423.html Signed-off-by: Mark Geisert Fixes: c6cfc99648d6 (Cygwin: sys/cpuset.h: add cpuset-specific external functions) --- win

[PATCH] Cygwin: Update release/3.4.8 for latest commit

2023-07-12 Thread Mark Geisert
--- winsup/cygwin/release/3.4.8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.4.8 b/winsup/cygwin/release/3.4.8 index d1e34ce3c..3113be8cb 100644 --- a/winsup/cygwin/release/3.4.8 +++ b/winsup/cygwin/release/3.4.8 @@ -3,3 +3,6 @@ Bug Fixes - Make safe for c89 c

Re: Where should relnote updates for Cygwin DLL patches be going?

2023-07-11 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 11 01:05, Mark Geisert wrote: AIUI for cygwin-3_4-branch they currently go to release/3.4.8. For the main|master branch they currently go where? release/3.5.0 An entry there is only necessary if it doesn't get picked for 3.4 anyway. Ah,

Where should relnote updates for Cygwin DLL patches be going?

2023-07-11 Thread Mark Geisert
AIUI for cygwin-3_4-branch they currently go to release/3.4.8. For the main|master branch they currently go where? I hope to get it right the first time ;-). Thank you, ..mark

[PATCH v2] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-09 Thread Mark Geisert
uly/253927.html Fixes: 9cc910dd33a5 (Cygwin: Make safe for c89 compilations) Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpus

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-09 Thread Mark Geisert
Hi all, Brian Inglis wrote: On 2023-07-08 15:53, Mark Geisert wrote: Mark Geisert wrote: I got tripped up by misspelling and not being able to link clang{,++} programs on my test system.  I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Mark Geisert wrote: [... blah blah ...] I got tripped up by misspelling and not being able to link clang{,++} programs on my test system. I checked the .o files with objdump: Clang and clang++ both support __builtin_popcountl, but they emit code for the Hackers Delight algorithm rather than

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-08 Thread Mark Geisert
Brian Inglis wrote: On 2023-07-07 12:54, Brian Inglis wrote: On 2023-07-07 03:44, Corinna Vinschen wrote: Hi Mark, On Jul  7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions.  Their presence here was a dubious optimization

Re: [PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 7 00:41, Mark Geisert wrote: The current version of cannot be compiled by Clang due to the use of __builtin* functions. Their presence here was a dubious optimization anyway, so their usage has been converted to standard library functions. A

[PATCH] Cygwin: Make gcc-specific code in compiler-agnostic

2023-07-07 Thread Mark Geisert
e safe for c89 compilations) Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 28 +++- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/include/sys/cpuset.h b/winsup/cygwin/include/sys/cpuset.h index 0c95134ff..f76e788d5 100644 ---

Re: [PATCH v2] Cygwin: Make safe for c89 compilations

2023-07-04 Thread Mark Geisert
Corinna Vinschen wrote: On Jul 4 16:33, Corinna Vinschen wrote: On Jul 3 17:51, Mark Geisert wrote: Four modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Add "#includ

[PATCH v2] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
15e5fbd99ec ("Cygwin: Fix type mismatch on sys/cpuset.h") Signed-off-by: Mark Geisert --- winsup/cygwin/include/sys/cpuset.h | 49 -- winsup/cygwin/release/3.4.7| 3 ++ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/winsup/cygwin/include/s

Re: [PATCH] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
Hi Corinna, Corinna Vinschen wrote: On Jul 3 02:27, Mark Geisert wrote: Brian Inglis wrote: On 2023-07-03 00:17, Mark Geisert wrote: Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline

Re: [PATCH] Cygwin: Make safe for c89 compilations

2023-07-03 Thread Mark Geisert
Hi Brian, Brian Inglis wrote: On 2023-07-03 00:17, Mark Geisert wrote: Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Don't declare loop variables on for-loo

[PATCH] Cygwin: Make safe for c89 compilations

2023-07-02 Thread Mark Geisert
Three modifications to include/sys/cpuset.h: * Change C++-style comments to C-style also supported by C++ * Change "inline" to "__inline" on code lines * Don't declare loop variables on for-loop init clauses Tested by first reproducing the reported issue with home-grown test programs by compiling

Re: [PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-07-02 Thread Mark Geisert
Mark Geisert wrote: [...] Thanks for the report and investigations.  I'll address this shortly. A candidate patch for 3.4.7 is incoming. If it passes muster I'll fire off a patch for 3.3.6. I don't know why I'm using military terminology. Independence Day soon in the

Re: [PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-07-02 Thread Mark Geisert
Hi all, Brian Inglis wrote: On 2023-07-01 08:20, Jon Turney wrote: On 14/03/2023 08:56, Mark Geisert wrote: Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to sta

[PATCH v2] Cygwin: Fix type mismatch on sys/cpuset.h

2023-03-14 Thread Mark Geisert
Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to static inline functions. This allows the macros to be type-safe. In addition, added a lower bound check to the functions that

[PATCH] Cygwin: Fix type mismatch on sys/cpuset.h -- relnote 3.4.6

2023-03-11 Thread Mark Geisert
--- winsup/cygwin/release/3.4.6 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.4.6 b/winsup/cygwin/release/3.4.6 index ccc168a95..ed124ed37 100644 --- a/winsup/cygwin/release/3.4.6 +++ b/winsup/cygwin/release/3.4.6 @@ -12,3 +12,6 @@ Addresses: https://cygwin.com/pi

[PATCH] Cygwin: Fix type mismatch on sys/cpuset.h

2023-03-10 Thread Mark Geisert
Addresses https://cygwin.com/pipermail/cygwin/2023-March/253220.html Take the opportunity to follow FreeBSD's and Linux's lead in recasting macro inline code as calls to static inline functions. This allows the macros to be type-safe. In addition, added a lower bound check to the functions that

Re: type mismatch on cpuset.h

2023-03-07 Thread Mark Geisert
[Redirected here from the main mailing list...] Hi Corinna, Corinna Vinschen via Cygwin wrote: Hi Mark, On Mar 6 07:57, Marco Atzeri via Cygwin wrote: Hi, building latest gdal I noticed a type mismatch, that forced me to build with "-fpermissive" on /usr/include/sys/cpuset.h

[PATCH] Cygwin: Have gmondump support ssp-generated gmon.out

2022-06-08 Thread Mark Geisert
Cygwin tool ssp generates gmon.out files with different address resolution than other tools do. Two address bytes per bucket rather than the usual four address bytes. Gprof can deal with the difference but gmondump can't because the latter's gmon.out header validation fails. - Remove the offending

[PATCH] Cygwin: Fix "0x0x" in gmondump and ssp man pages

2022-04-21 Thread Mark Geisert
A recent patch fixed gmondump to stop printing "0x0x" as an address prefix. It turns out the Cygwin User's Guide and the gmondump and ssp man pages (all from utils.xml) have examples of the same error. --- winsup/cygwin/release/3.3.5 | 2 +- winsup/doc/utils.xml| 4 ++-- 2 files changed,

Re: [PATCH] Cygwin: Fix gmondump formatting goofs

2022-03-16 Thread Mark Geisert
Corinna Vinschen wrote: On Mar 14 17:47, Mark Geisert wrote: The rewrite of %X to %p was malhandled. Fix that/them. This should probably go into 3.3 as well. Care to write a matching entry for the release/3.3.5 file? Done, under separate patch https://cygwin.com/pipermail/cygwin-patches

[PATCH] Cygwin: document recent gmondump formatting fix

2022-03-16 Thread Mark Geisert
--- winsup/cygwin/release/3.3.5 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/winsup/cygwin/release/3.3.5 b/winsup/cygwin/release/3.3.5 index 752d65703..d2a7f772a 100644 --- a/winsup/cygwin/release/3.3.5 +++ b/winsup/cygwin/release/3.3.5 @@ -40,3 +40,6 @@ Bug Fixes - Fix a problem that f

[PATCH] Cygwin: Fix gmondump formatting goofs

2022-03-14 Thread Mark Geisert
The rewrite of %X to %p was malhandled. Fix that/them. --- winsup/utils/gmondump.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/utils/gmondump.c b/winsup/utils/gmondump.c index ec9db0598..2d29e826d 100644 --- a/winsup/utils/gmondump.c +++ b/winsup/utils/gmondu

Re: [PATCH v2] Cygwin: clipboard: Fix a bug in read().

2021-12-08 Thread Mark Geisert
I guess it's not possible to keep rid of a data item like I'd hoped. At least "data[]" is cleaner than the historical "data[1]" here. If you call the item cb_data I can live with it. Thanks all for the discussion. ..mark

Re: [PATCH v2] Cygwin: clipboard: Fix a bug in read().

2021-12-07 Thread Mark Geisert
((char *) (clipbuf + 1)) + pos and all should be golden. I don't think extra commentary is needed in code. (I think.) ..mark

[PATCH v2] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-25 Thread Mark Geisert
This patch unifies the layout of the clipboard descriptor cygcb_t for 32- and 64-bit Cygwin. It allows correct copy/paste between the two environments without corruption of user's copied data and without access violations due to interpreting that data as a size field. The definitions of CYGWIN_NA

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-23 Thread Mark Geisert
Ken Brown wrote: On 10/23/2021 1:35 AM, Mark Geisert wrote: Corinna Vinschen wrote: Just to close this up prior to the 3.3.0 release... Given we never actually strived for 32<->64 bit interoperability, it's hard to argue why this should be different for the clipboard stuff. Runnin

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-22 Thread Mark Geisert
Hi all, Corinna Vinschen wrote: On Oct 11 08:11, Ken Brown wrote: On 10/11/2021 2:13 AM, Mark Geisert wrote: It's just that after submitting the patch I realized that, if we really are going to support both Cygwin archs (x86_64 and i686), there is still the issue of different cygcb_t la

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-10 Thread Mark Geisert
pboard data. This will hopefully distinguish between the 3 historical cygcb_t layouts as well as x86_64 differing from i686 for each one. Stay tuned, ..mark

Re: [PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-06 Thread Mark Geisert
Mark Geisert wrote: This allows correct copy and pasting between the two Cygwin flavors. [...] Eh, that's a bad patch. Don't apply. It's OK for concept review. v2 forthcoming. Thanks, ..mark

[PATCH] Cygwin: Make native clipboard layout same for 32- and 64-bit

2021-10-06 Thread Mark Geisert
This allows correct copy and pasting between the two Cygwin flavors. What's done is to overlay the differing timespec formats via a union within the control structure cygcb_t. Then conversion between the two formats is done on the 32-bit side only. The cygutils package has two programs, putclip

[PATCH] Cygwin: Make gmondump conform to its doc + adjust doc

2021-08-02 Thread Mark Geisert
The doc for gmondump says 1 or more FILENAME are expected, but 0 is handled. That's an oversight. Make invocation with 0 FILENAMEs print a one-line help message. Reword the beginning of profiler's description doc to clarify target's child processes are run but only optionally profiled. --- winsu

[PATCH] Cygwin: More profiler format + small issue fixes

2021-08-01 Thread Mark Geisert
Make sure to cast to ulong all DWORD values displayed with format "%lu". More instances are fixed here than in either my earlier unused patch or Corinna's patch. I decided to use typedef..ulong for more compact code. Address jturney's reported small issues: - Remove explicit external ref for cygwi

[PATCH] Cygwin: fix format warnings in profiler.cc

2021-07-21 Thread Mark Geisert
Use new typedef to normalize pids for printing on both 32- and 64-bit Cygwin. --- winsup/utils/profiler.cc | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/winsup/utils/profiler.cc b/winsup/utils/profiler.cc index d1a01c3a2..152bf1cca 100644 --- a/winsup/utils/profiler

[PATCH 3/3] Cygwin: updates to wire in profiler, gmondump

2021-07-15 Thread Mark Geisert
These are updates to wire into the build tree the new tools profiler and gmondump, and to supply documentation for the tools. The documentation for profiler and ssp now mention each other but do not discuss their similarities or differences. That will be handled in a future update to the "Profili

[PATCH 2/3] Cygwin: New tool: gmondump

2021-07-15 Thread Mark Geisert
b/winsup/utils/gmondump.c @@ -0,0 +1,255 @@ +/* +gmondump.c +Displays summary info about given profile data file(s). + +Written by Mark Geisert . + +This file is part of Cygwin. + +This software is a copyrighted work licensed under the terms of the +Cygwin license. Please c

[PATCH 1/3] Cygwin: New tool: profiler

2021-07-15 Thread Mark Geisert
nsup/utils/profiler.cc new file mode 100644 index 0..d1a01c3a2 --- /dev/null +++ b/winsup/utils/profiler.cc @@ -0,0 +1,1109 @@ +/* +profiler.cc +Periodically samples IP of a process and its DLLs; writes gprof data files. + +Written by Mark Geisert , who admits to +copying pre

[PATCH] Cygwin: Zero out gmon header before use

2021-06-23 Thread Mark Geisert
Tools that process gmon.out files can be confused by gmon header fields with garbage in them due to lack of initialization. Repair that. --- winsup/cygwin/gmon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/gmon.c b/winsup/cygwin/gmon.c index b31842cd9..8b1c449c4 100644 ---

Re: [PATCH] Cygwin: New tool: cygmon

2021-06-17 Thread Mark Geisert
Hi Jon, I appreciate your review. I will fold the suggestions from your short email plus this longer email into a v2 patch fairly soon. Jon Turney wrote: On 12/06/2021 07:46, Mark Geisert wrote: diff --git a/winsup/utils/cygmon.cc b/winsup/utils/cygmon.cc new file mode 100644 index

Re: [PATCH] Cygwin: New tool: cygmon

2021-06-15 Thread Mark Geisert
Hi Jon, Jon Turney wrote: On 12/06/2021 07:46, Mark Geisert wrote: This tool is a sampling profiler of Cygwin programs with their DLLs. Presently its development is managed at https://github.com/mgeisert/cygmon. Documentation of cygmon has been added to the usual doc/utils.xml file. Nice

[PATCH] Cygwin: New tool: cygmon

2021-06-11 Thread Mark Geisert
ram is mainly useful for debugging the Cygwin DLL diff --git a/winsup/utils/cygmon.cc b/winsup/utils/cygmon.cc new file mode 100644 index 0..9156b27d7 --- /dev/null +++ b/winsup/utils/cygmon.cc @@ -0,0 +1,1240 @@ +/* +cygmon.cc +Periodically samples IP of a process and its DLLs; writ

Re: [PATCH v2] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-12 Thread Mark Geisert
! ..mark

[PATCH v2] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-10 Thread Mark Geisert
Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added to the open call that tmpfile internally makes. This v2 patch removes O_CREAT from open() call as O_TMPFILE

Re: [PATCH] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-10 Thread Mark Geisert
Hi Corinna, Corinna Vinschen via Cygwin-patches wrote: Hi Mark, On Feb 9 02:50, Mark Geisert wrote: Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added to

[PATCH] Cygwin: Have tmpfile(3) use O_TMPFILE

2021-02-09 Thread Mark Geisert
Per discussion on cygwin-developers, a Cygwin tmpfile(3) implementation has been added to syscalls.cc. This overrides the one supplied by newlib. Then the open(2) flag O_TMPFILE was added to the open call that tmpfile internally makes. --- winsup/cygwin/release/3.2.0 | 4 winsup/cygwin/sys

Re: [PATCH] Cygwin: Interim malloc speedup

2021-01-17 Thread Mark Geisert
Hi Corinna, Happy New Year back at you! I'm very glad to see you posting again! Corinna Vinschen via Cygwin-patches wrote: Hi Mark, Happy New Year! On Dec 21 20:53, Mark Geisert wrote: Replaces function-level lock with data-level lock provided by existing dlmalloc. Sets up to e

Re: [PATCH] Cygwin: Interim malloc speedup -- addendum

2020-12-24 Thread Mark Geisert
I could easily provide an updated patch without the MSPACES stuff, given that that aspect is not really functional at this point. Just let me know. ..mark

[PATCH] Cygwin: Interim malloc speedup

2020-12-21 Thread Mark Geisert
Replaces function-level lock with data-level lock provided by existing dlmalloc. Sets up to enable dlmalloc's MSPACES, but does not yet enable them due to visible but uninvestigated issues. Single-thread applications may or may not see a performance gain, depending on how heavily it uses the mall

Re: [PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-07 Thread Mark Geisert
Hi Corinna, Corinna Vinschen via Cygwin-patches wrote: On Dec 7 16:30, Corinna Vinschen via Cygwin-patches wrote: On Dec 7 02:29, Mark Geisert wrote: The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable

[PATCH] Cygwin: Allow to set SO_PEERCRED zero (v2)

2020-12-07 Thread Mark Geisert
The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable the workaround set_no_getpeereid behavior for Python one has to be able to set SO_PEERCRED to zero. Ergo, this patch. Python has no way to specify a NULL po

[PATCH] Cygwin: Allow to set SO_PEERCRED zero

2020-12-06 Thread Mark Geisert
The existing code errors as EINVAL any attempt to set a value for SO_PEERCRED via setsockopt() on an AF_UNIX/AF_LOCAL socket. But to enable the workaround set_no_getpeereid behavior for Python one has to be able to set SO_PEERCRED to zero. Ergo, this patch. Python has no way to specify a NULL po

  1   2   3   >