[PATCH] Cygwin: Implement CPU_SET(3) macros

2019-06-30 Thread Mark Geisert
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

Re: [PATCH] Cygwin: Build cygwin-console-helper with correct compiler

2019-06-26 Thread Mark Geisert
Corinna Vinschen wrote: On Jun 26 01:48, Mark Geisert wrote: Corinna Vinschen wrote: On Jun 25 00:54, Mark Geisert wrote: --- winsup/utils/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index b64f457e7

[PATCH] Cygwin: Use correct string conversion

2019-06-26 Thread Mark Geisert
Correct the string conversion calls so both argv elements get converted at full precision. --- winsup/utils/cygwin-console-helper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/utils/cygwin-console-helper.cc b/winsup/utils/cygwin-console-helper.cc index

[PATCH v3] Cygwin: Fix return value of sched_getaffinity

2019-06-26 Thread Mark Geisert
Have sched_getaffinity() interface like glibc's, and provide an undocumented internal interface __sched_getaffinity_sys() like the Linux kernel's sched_getaffinity() for benefit of taskset(1). --- newlib/libc/include/sched.h| 3 +++ winsup/cygwin/common.din | 1 +

Re: [PATCH] Cygwin: Build cygwin-console-helper with correct compiler

2019-06-26 Thread Mark Geisert
Corinna Vinschen wrote: On Jun 25 00:54, Mark Geisert wrote: --- winsup/utils/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index b64f457e7..cebf39572 100644 --- a/winsup/utils/Makefile.in +++ b/winsup

[PATCH v2] Fix return value of sched_getaffinity

2019-06-26 Thread Mark Geisert
Have sched_getaffinity() interface like glibc's, and provide an undocumented internal interface __sched_getaffinity_sys() like the Linux kernel's sched_getaffinity() for benefit of taskset(1). --- newlib/libc/include/sched.h| 1 + winsup/cygwin/common.din | 1 +

Re: [PATCH] Cygwin: Fix return value of sched_getaffinity

2019-06-25 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, On Jun 24 22:25, Mark Geisert wrote: Return what the documentation says, instead of a misreading of it. --- winsup/cygwin/sched.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index

[PATCH] Cygwin: Build cygwin-console-helper with correct compiler

2019-06-25 Thread Mark Geisert
--- winsup/utils/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index b64f457e7..cebf39572 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -64,7 +64,7 @@ MINGW_BINS := ${addsuffix

[PATCH] Cygwin: Fix return value of sched_getaffinity

2019-06-24 Thread Mark Geisert
Return what the documentation says, instead of a misreading of it. --- winsup/cygwin/sched.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/cygwin/sched.cc b/winsup/cygwin/sched.cc index e7b44d319..8f24bf80d 100644 --- a/winsup/cygwin/sched.cc +++

[PATCH v3] Cygwin: Implement sched_[gs]etaffinity()

2019-06-23 Thread Mark Geisert
This patch set implements the Linux syscalls sched_getaffinity, sched_setaffinity, pthread_getaffinity_np, and pthread_setaffinity_np. Linux has a straightforward view of the cpu sets used in affinity masks. They are simply long (1024-bit) bit masks. This code emulates that view while internally

Re: [PATCH v2] Cygwin: Implement sched_[gs]etaffinity()

2019-04-29 Thread Mark Geisert
groups always have 64 logical processors. I'm just trying to get the control structures laid out. A later version will deal with smaller-sized processor groups. On Apr 28 22:38, Mark Geisert wrote: There are a couple of multi-group affinity operations that cannot be done without heroic measures

[PATCH v2] Cygwin: Implement sched_[gs]etaffinity()

2019-04-28 Thread Mark Geisert
There are a couple of multi-group affinity operations that cannot be done without heroic measures. Those are marked with XXX in the code. Further discussion would be helpful to me. --- newlib/libc/include/sched.h | 13 ++ winsup/cygwin/common.din| 4 +

[PATCH] Implement sched_[gs]etaffinity()

2019-04-10 Thread Mark Geisert
--- newlib/libc/include/sched.h | 4 +++ winsup/cygwin/sched.cc | 68 + 2 files changed, 72 insertions(+) diff --git a/newlib/libc/include/sched.h b/newlib/libc/include/sched.h index 1016235bb..e3a5b97e5 100644 --- a/newlib/libc/include/sched.h +++

[PATCH] fix version typo

2018-11-30 Thread Mark Geisert
--- winsup/doc/new-features.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml index e3786e545..7cc449764 100644 --- a/winsup/doc/new-features.xml +++ b/winsup/doc/new-features.xml @@ -4,7 +4,7 @@ What's new and

[PATCH v2] Fix return value on aio_read/write success

2018-08-06 Thread Mark Geisert
Internally track resultant byte counts as ssize_t, but return 0 as int for success indication, per POSIX. --- winsup/cygwin/aio.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc index fe63dec04..7d5d98299 100644 ---

Re: [PATCH] Fix return value on aio_read/write success

2018-08-04 Thread Mark Geisert
Corinna Vinschen wrote: On Aug 4 01:44, Mark Geisert wrote: Oops. Something that iozone testing had found but I regarded as an iozone bug. Re-reading the man pages set me straight. --- winsup/cygwin/aio.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin

[PATCH] Fix return value on aio_read/write success

2018-08-04 Thread Mark Geisert
Oops. Something that iozone testing had found but I regarded as an iozone bug. Re-reading the man pages set me straight. --- winsup/cygwin/aio.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc index fe63dec04..571a9621b 100644

Re: [PATCH 0/1] Update _PC_ASYNC_IO return value

2018-07-26 Thread Mark Geisert
Hi Corinna, On Thu, 26 Jul 2018, Corinna Vinschen wrote: On Jul 25 15:06, Yaakov Selkowitz wrote: From discussion on IRC: corinna, just sent a patch for _POSIX_ASYNCHRONOUS_IO as a follow-up to the AIO feature, but am still wondering about _[POSIX|PC]_ASYNC_IO [snip] in

[PATCH final] POSIX Asynchronous I/O support

2018-07-23 Thread Mark Geisert
(Let's try that again from the correct directory...) This is believed to be the final patch set implementing POSIX AIO. It incorporates updates and fixes for all issues brought up over several review cycles the last few months. The implementation has been tested with a couple different

[PATCH final 1/3] POSIX Asynchronous I/O support: aio files

2018-07-23 Thread Mark Geisert
This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within the Cygwin DLL by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality. --- winsup/cygwin/aio.cc| 1005 +++

[PATCH final 2/3] POSIX Asynchronous I/O support: fhandler files

2018-07-23 Thread Mark Geisert
This code is where the AIO implementation is wired into existing Cygwin mechanisms for file and device I/O: the fhandler* functions. It makes use of an existing internal routine prw_open to supply a "shadow fd" that permits asynchronous operations on a file the user app accesses via its own fd.

[PATCH final 3/3] POSIX Asynchronous I/O support: other files

2018-07-23 Thread Mark Geisert
Updates to misc files to integrate AIO into the Cygwin source tree. Much of it has to be done when adding any new syscalls. There are some updates to limits.h for AIO-specific limits. And some doc mods. --- winsup/cygwin/Makefile.in | 1 + winsup/cygwin/common.din |

Re: [PATCH v4 1/2] POSIX Asynchronous I/O support: aio files

2018-07-23 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, there's just one problem left: [...] + + QueryUnbiasedInterruptTime (); Nice idea to use QueryUnbiasedInterruptTime. The problem here is just that QueryUnbiasedInterruptTime has been introduced with Windows 7, but we still support Windows Vista :} We

[PATCH v4 2/2] POSIX Asynchronous I/O support: fhandler files

2018-07-20 Thread Mark Geisert
This code is where the AIO implementation is wired into existing Cygwin mechanisms for file and device I/O: the fhandler* functions. It makes use of an existing internal routine prw_open to supply a "shadow fd" that permits asynchronous operations on a file the user app accesses via its own fd.

[PATCH v4 1/2] POSIX Asynchronous I/O support: aio files

2018-07-20 Thread Mark Geisert
This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within the Cygwin DLL by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality. --- winsup/cygwin/aio.cc| 1006 +++

[PATCH] fix duration handling in sigtimedwait

2018-07-19 Thread Mark Geisert
--- winsup/cygwin/signal.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index e581d28da..de3e88697 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -640,6 +640,8 @@ sigtimedwait (const sigset_t *set, siginfo_t *info,

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-18 Thread Mark Geisert
Corinna Vinschen wrote: Mark, I think there's a bug in sigtimedwait. I just found the problem while looking into this aio_suspend stuff: On Jul 17 16:51, Corinna Vinschen wrote: + res = sigtimedwait (, , to); You're giving the timeout value verbatim to sigtimedwait(). Let's have a look

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: Hey Mark, I just belatedly noticed a few problems in aiosuspend: On Jul 15 01:20, Mark Geisert wrote: +static int +aiosuspend (const struct aiocb *const aiolist[], + int nent, const struct timespec *timeout) +{ + /* Returns lowest list index of completed aios

Re: [PATCH v3 2/3] POSIX Asynchronous I/O support: fhandler files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: On Jul 15 01:20, Mark Geisert wrote: + if (aio) + status = NtReadFile (prw_handle, aiocb->aio_win_event, NULL, NULL, +>aio_win_iosb, buf, count, , NULL); + else + status = NtReadFile (prw_handle, NULL, NULL, NULL,

Re: [PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-17 Thread Mark Geisert
Corinna Vinschen wrote: Hi Mark, this looks good. Inline comments as usual. Thank you; OK. On Jul 15 01:20, Mark Geisert wrote: [...] +static int +aiochkslot (struct aiocb *aio) +{ + /* Sanity check.. make sure this AIO is not already busy */ + for (int slot = 0; slot < AIO_MAX; ++s

[PATCH v3 1/3] POSIX Asynchronous I/O support: aio files

2018-07-15 Thread Mark Geisert
This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within the Cygwin DLL by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality. --- winsup/cygwin/aio.cc| 984

[PATCH v3 2/3] POSIX Asynchronous I/O support: fhandler files

2018-07-15 Thread Mark Geisert
This code is where the AIO implementation is wired into existing Cygwin mechanisms for file and device I/O: the fhandler* functions. It makes use of an existing internal routine prw_open to supply a "shadow fd" that permits asynchronous operations on a file the user app accesses via its own fd.

[PATCH v3 3/3] POSIX Asynchronous I/O support: other files

2018-07-15 Thread Mark Geisert
Updates to misc files to integrate AIO into the Cygwin source tree. Much of it has to be done when adding any new syscalls. There are some updates to limits.h for AIO-specific limits. And some doc mods. --- winsup/cygwin/Makefile.in | 1 + winsup/cygwin/common.din |

[PATCH v3 0/3] POSIX Asynchronous I/O support

2018-07-15 Thread Mark Geisert
This is intended to be the final patch set implementing POSIX AIO. The string XXX marks issues I'm specifically requesting comments on. I think there are only two of these XXXs left, both in aio.cc. Questions, comments, or suggestions are all welcome. Thanks & Regards, ..mark "Hell is

Re: [PATCH v2 1/3] Posix asynchronous I/O support: aio files

2018-05-15 Thread Mark Geisert
On Wed, 2 May 2018, Brian Inglis wrote: On 2018-05-02 02:21, Mark Geisert wrote: I found a discrepancy in the Cygwin source tree and would like input on how to resolve it... On Thu, 19 Apr 2018, Corinna Vinschen wrote: +static void +aionotify (struct aiocb *aio) +{ +  /* if signal notification

Re: [PATCH v2 1/3] Posix asynchronous I/O support: aio files

2018-05-02 Thread Mark Geisert
Hi Corinna, I found a discrepancy in the Cygwin source tree and would like input on how to resolve it... On Thu, 19 Apr 2018, Corinna Vinschen wrote: +static void +aionotify (struct aiocb *aio) +{ + /* if signal notification wanted, send AIO-complete signal */ + //XXX Is sigqueue() the best

[PATCH v2 3/3] Posix asynchronous I/O support: other files

2018-04-19 Thread Mark Geisert
Updates to misc files to integrate AIO into the Cygwin source tree. Much of it has to be done when adding any new syscalls. There are some updates to limits.h for AIO-specific limits. And some doc mods. This is the 2nd WIP patch set for AIO. The string XXX marks issues I'm specifically

[PATCH v2 1/3] Posix asynchronous I/O support: aio files

2018-04-19 Thread Mark Geisert
This is the core of the AIO implementation: aio.cc and aio.h. The latter is used within Cygwin by aio.cc and the fhandler* modules, as well as by user programs wanting the AIO functionality. This is the 2nd WIP patch set for AIO. The string XXX marks issues I'm specifically requesting comments

[PATCH v2 0/3] Posix asynchronous I/O support

2018-04-19 Thread Mark Geisert
This is the 2nd WIP patch set for AIO. The string XXX marks issues I'm specifically requesting comments on, but feel free to comment or suggest changes on any of this code. The code is working for both non-stress and stress situations I can provoke with a test program I have. The code only

[PATCH v2 1/2] Posix asynchronous I/O support: fhandler files

2018-04-19 Thread Mark Geisert
This code is where the AIO implementation is wired into existing Cygwin mechanisms for file and device I/O: the fhandler* functions. It makes use of an existing internal routine prw_open to supply a "shadow fd" that permits asynchronous operations on a file the user app accesses via its own fd.

[PATCH] Posix asynchronous I/O support, part 2

2018-03-28 Thread Mark Geisert
--- winsup/cygwin/include/aio.h | 78 + 1 file changed, 78 insertions(+) create mode 100644 winsup/cygwin/include/aio.h diff --git a/winsup/cygwin/include/aio.h b/winsup/cygwin/include/aio.h new file mode 100644 index 0..d6ca56517 ---

[PATCH] Posix asynchronous I/O support, part 3

2018-03-28 Thread Mark Geisert
--- winsup/cygwin/aio.cc | 580 +++ 1 file changed, 580 insertions(+) create mode 100644 winsup/cygwin/aio.cc diff --git a/winsup/cygwin/aio.cc b/winsup/cygwin/aio.cc new file mode 100644 index 0..01bf2e479 --- /dev/null +++

[PATCH] Posix asynchronous I/O support, part 1

2018-03-28 Thread Mark Geisert
--- winsup/cygwin/Makefile.in | 1 + winsup/cygwin/common.din | 8 winsup/cygwin/include/cygwin/version.h | 4 +++- winsup/cygwin/include/limits.h | 12 ++-- winsup/doc/posix.xml | 16 5 files changed, 26

Re: [PATCH] doc/ntsec.xml: Fix typo

2018-02-22 Thread Mark Geisert
On Thu, 22 Feb 2018, David Macek wrote: On 2018-02-21 14:05, Corinna Vinschen wrote: The patch is malformed. It claims to contain 7 lines (6 lines context, one line changed), but actually it has only 4 lines context. Please check your git settings. On 21. 2. 2018 22:56, Brian Inglis wrote:

[PATCH] Define internal function mythreadname() -- revised

2018-01-24 Thread Mark Geisert
This new function returns the name of the calling thread; works for both cygthreads and pthreads. All calls to cygthread::name(/*void*/) replaced by calls to mythreadname(/*void*/). --- winsup/cygwin/exceptions.cc | 4 ++-- winsup/cygwin/fhandler_tty.cc | 2 +- winsup/cygwin/strace.cc

[PATCH] Define internal function mythreadname() This new function returns the name of the calling thread; works for both cygthreads and pthreads. All calls to cygthread::name(/*void*/) replaced by cal

2018-01-22 Thread Mark Geisert
--- winsup/cygwin/exceptions.cc | 4 ++-- winsup/cygwin/fhandler_tty.cc | 2 +- winsup/cygwin/strace.cc | 2 +- winsup/cygwin/thread.cc | 17 + winsup/cygwin/thread.h| 3 +++ 5 files changed, 24 insertions(+), 4 deletions(-) diff --git

Re: [PATCH] cygwin_internal methods to get/set thread name

2017-12-22 Thread Mark Geisert
On Thu, 21 Dec 2017, Corinna Vinschen wrote: On Dec 21 00:29, Mark Geisert wrote: On Wed, 20 Dec 2017, Corinna Vinschen wrote: Hi Mark, A lot to discuss here. Yes, but first let me say I'd call these "speculative" patches, things I found necessary during aio library developme

Re: [PATCH] cygwin_internal methods to get/set thread name

2017-12-21 Thread Mark Geisert
gram whose pthreads are making Cygwin syscalls. The code in this block allows to get the user-supplied pthread name for use in strace logging, rather than having "unknown thread 0x###" displayed. On Dec 20 00:08, Mark Geisert wrote: Add support to cygwin_internal() for setting

[PATCH] cygwin_internal methods to get/set thread name

2017-12-20 Thread Mark Geisert
Add support to cygwin_internal() for setting a cygthread name and getting or setting a pthread name. Also add support for getting the internal i/o handle for a given file descriptor. --- winsup/cygwin/cygthread.cc | 40 +++-- winsup/cygwin/cygthread.h

Re: [PATCH] Implement sigtimedwait (revised)

2017-12-18 Thread Mark Geisert
On Mon, 18 Dec 2017, Corinna Vinschen wrote: Hi Mark, [...] as I wrote on Friday, the patch looks good to me. I just need a contributors license agreement from you per the "Before you get started" section on https://cygwin.com/contrib.html Hi Corinna, Y'all should have one from me on file

Re: [PATCH] Implement sigtimedwait

2017-12-14 Thread Mark Geisert
On Thu, 14 Dec 2017, Corinna Vinschen wrote: Hi Mark, Thanks for sigtimedwait! Two questions: On Dec 13 22:54, Mark Geisert wrote: diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 69c5e2aad..0599d8a3e 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc

[PATCH] Implement sigtimedwait (revised)

2017-12-14 Thread Mark Geisert
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to implement the latter. --- winsup/cygwin/common.din | 1 + winsup/cygwin/include/cygwin/version.h | 3 ++- winsup/cygwin/signal.cc| 36 -- winsup/cygwin/thread.cc

[PATCH] Implement sigtimedwait

2017-12-13 Thread Mark Geisert
Abstract out common code from sigwait/sigwaitinfo/sigtimedwait to implement the latter. --- winsup/cygwin/common.din | 1 + winsup/cygwin/include/cygwin/version.h | 3 ++- winsup/cygwin/signal.cc| 32 ++-- winsup/cygwin/thread.cc

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-12-11 Thread Mark Geisert
Just closing out this email thread... On Fri, 1 Dec 2017, Mark Geisert wrote: On Fri, 1 Dec 2017, Corinna Vinschen wrote: On Dec 1 10:30, Corinna Vinschen wrote: On Dec 1 00:44, Mark Geisert wrote: And then pwrite() creates its own handle (or reuses one (!)) to avoid messing up the seek

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-12-02 Thread Mark Geisert
On Sat, 2 Dec 2017, Corinna Vinschen wrote: On Dec 1 13:46, Mark Geisert wrote: I'm open to using overlapped I/O for the usual read & write cases of aio but there are some extensions I have in mind that don't allow for overlapped so I think I need to have threads handle them. I might com

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-12-01 Thread Mark Geisert
On Fri, 1 Dec 2017, Corinna Vinschen wrote: On Dec 1 10:30, Corinna Vinschen wrote: On Dec 1 00:44, Mark Geisert wrote: [...] I'd better take this info back to "the lab" and do some more digging. Thanks very much for these details and your earlier replies.

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-12-01 Thread Mark Geisert
On Thu, 30 Nov 2017, Corinna Vinschen wrote: On Nov 30 01:50, Mark Geisert wrote: Yes, I believe that's correct. But in my aio implementation for Cygwin, I'm not using overlapped I/O or any kind of async or nonblocking write. I'm using separate threads to do plain vanilla blocking writes (via

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-30 Thread Mark Geisert
On Wed, 29 Nov 2017, Corinna Vinschen wrote: On Nov 29 13:36, Corinna Vinschen wrote: On Nov 29 13:04, Corinna Vinschen wrote: - If you do async IO, you have to handle STATUS_PENDING gracefully: - The IO_STATUS_BLOCK given to NtWriteFile *must* exist for the entire time the operation

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-29 Thread Mark Geisert
On Wed, 29 Nov 2017, I wrote: I added the printf()s and, what do you know, it shows all the NtWriteFile()s That's an American English idiom and is not meant to be taken literally. It's like "How about that?" or "Can you believe it?". Perhaps y'all

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-29 Thread Mark Geisert
Corinna Vinschen wrote: On Nov 28 02:28, Mark Geisert wrote: Corinna Vinschen wrote: On Nov 28 00:03, Mark Geisert wrote: Mark Geisert wrote: --- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-28 Thread Mark Geisert
Corinna Vinschen wrote: On Nov 28 00:03, Mark Geisert wrote: Mark Geisert wrote: --- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5dfcae4d9

Re: [PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-28 Thread Mark Geisert
Mark Geisert wrote: --- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5dfcae4d9..2ead9948c 100644 [...] Oops, I neglected to include an explanatory

[PATCH] Initialize IO_STATUS_BLOCK for pread, pwrite

2017-11-27 Thread Mark Geisert
--- winsup/cygwin/fhandler_disk_file.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 5dfcae4d9..2ead9948c 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++

Remove "function" from line to avoid dash objecting to this bash-ism

2017-04-06 Thread Mark Geisert
instead of bash has the build running 5%-10% faster. Cheers, ..mark From fb9db7a75c7e391f451cb1df3c1e8463ef4c7bf3 Mon Sep 17 00:00:00 2001 From: Mark Geisert <m...@maxrnd.com> Date: Wed, 5 Apr 2017 22:20:09 -0700 Subject: [PATCH] Remove "function" from line to avoid dash objecting t

Re: Fwd: [PATCH] spinlock spin with pause instruction

2016-03-11 Thread Mark Geisert
Václav Haisman wrote: Hi. I have noticed that Cygwin's spinlock goes into heavy sleeping code for each spin. It seems it would be a good idea to actually try to spin a bit first. There is this 'pause' instruction which let's the CPU make such busy loops be less busy. Here is a patch to do this.

[PATCH] Documentation covering profiling Cygwin programs.

2016-03-11 Thread Mark Geisert
adc25dc19ade01fe42d4a4446a24b45ddd01f106 Mon Sep 17 00:00:00 2001 From: Mark Geisert <m...@maxrnd.com> Date: Thu, 10 Mar 2016 23:56:56 -0800 Subject: [PATCH] Documentation covering profiling Cygwin programs. --- winsup/doc/gprof.xml | 250 +

Re: [PATCH] Support profiling of multi-threaded apps.

2016-03-10 Thread Mark Geisert
On Thu, 10 Mar 2016, Corinna Vinschen wrote: On Mar 10 10:39, Corinna Vinschen wrote: On Mar 10 00:35, Mark Geisert wrote: This is Version 4 incorporating review comments of Version 3. This is just the code patch; a separate doc patch is forthcoming. Uhm... + long divisor

Re: [PATCH] Support profiling of multi-threaded apps.

2016-03-10 Thread Mark Geisert
ctl): Call pthread_atfork() to set profile_child callback. Thank you, ..mark >From e65fb126be97090f92e9ee919a87116feaaffa49 Mon Sep 17 00:00:00 2001 From: Mark Geisert <m...@maxrnd.com> Date: Fri, 19 Feb 2016 22:58:31 -0800 Subject: [PATCH] Support profiling of multi-threaded apps. This

[PATCH] Support profiling of multi-threaded apps.

2016-03-09 Thread Mark Geisert
ctl): Call pthread_atfork() to set profile_child callback. Thanks, ..mark From 56b79572a654293e940a03d016833f07157dbef1 Mon Sep 17 00:00:00 2001 From: Mark Geisert <m...@maxrnd.com> Date: Fri, 19 Feb 2016 22:58:31 -0800 Subject: [PATCH] Support profiling of multi-threaded apps. This patch set m

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-25 Thread Mark Geisert
On Tue, 23 Feb 2016, Corinna Vinschen wrote: On Feb 22 23:36, Mark Geisert wrote: On Mon, 22 Feb 2016, Jon Turney wrote: There doesn't seem to be anything specific to profiling about this, so it could be written in a more generic way, as "call a callback function for each thread".

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Mark Geisert
Hi Jon, On Mon, 22 Feb 2016, Jon Turney wrote: Thanks for this. A few comments inline. On 20/02/2016 08:16, Mark Geisert wrote: +/* Called from profil.c to sample all non-main thread PC values for profiling */ +extern "C" void +cygheap_profthr_all (void (*profthr_byhandl

Re: [PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-22 Thread Mark Geisert
On Mon, 22 Feb 2016, Corinna Vinschen wrote: One is, for completeness it would be nice if you could add a description to the git comment along the lines of your original comment so we have a description in the log. Sorry, can't parse this; git newbie here. Did you mean the 'git commit' I'm

[PATCH] gprof profiling of multi-threaded Cygwin programs, ver 2

2016-02-20 Thread Mark Geisert
Version 2 incorporating review comments of version 1. Change log relative to winsup/cygwin: * include/sys/cygwin.h: Add CW_CYGHEAP_PROFTHR_ALL. * cygheap.cc (cygheap_profthr_all): New C-callable function that runs cygheap's threadlist handing each pthread's thread handle

Re: gprof profiling of multi-threaded Cygwin programs

2016-02-18 Thread Mark Geisert
On Thu, 18 Feb 2016, Corinna Vinschen wrote: On Feb 17 22:35, Mark Geisert wrote: I do see that a case could be made for general profiling documentation in winsup/doc/programming.xml but that's more than I want to take on at the moment. It doesn't have to be part of the source patch

Re: gprof profiling of multi-threaded Cygwin programs

2016-02-18 Thread Mark Geisert
On Thu, 18 Feb 2016, Jon Turney wrote: Thanks for this. On 17/02/2016 05:28, Mark Geisert wrote: There is a behavioral change that ought to be documented somewhere: If a gmon.out file exists when a profiled application exits, the app will now dump its profiling info into another file

gprof profiling of multi-threaded Cygwin programs

2016-02-16 Thread Mark Geisert
I've attached a patch set modifying Cygwin's profiling support to sample PC values of all an application's threads, not just the main thread. There is no change to how profiling is requested: just compile and link the app with "-pg" as usual. The profiling info is dumped into file gmon.out as

[PATCH] FAQ update: packages needed to build Cygwin

2013-12-30 Thread Mark Geisert
Hope I'm doing this correctly. Here is the ChangeLog entry followed by the patch. I wasn't sure if patch originator or patch committer, if different, gets their name in the ChangeLog entry. Patch rationale available on request. Cheers, ..mark 2013-12-31 Mark Geisert m

Re: [PATCH] FAQ update: packages needed to build Cygwin

2013-12-30 Thread Mark Geisert
Missed this in proofreading... +installed; you at least need literalg++/literal, literalmake/literal, ..should be.. +installed; you at least need literalgcc-g++/literal, literalmake/literal, ..mark

<    1   2