Re: [PATCH] POSIX monotonic clock

2010-08-03 Thread Václav Haisman
On Mon, 02 Aug 2010 15:49:08 -0500, "Yaakov (Cygwin/X)" wrote: > Here is an attempt to implement POSIX.1-2004+ Monotonic Clock: > > http://www.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html > > In summary, I took hires_us and changed the resolution to nanoseconds. I > dropped sys

Re: [PATCH] POSIX monotonic clock

2010-08-03 Thread Václav Haisman
On Tue, 03 Aug 2010 09:32:47 +0200, Václav Haisman wrote: > On Mon, 02 Aug 2010 15:49:08 -0500, "Yaakov (Cygwin/X)" wrote: >> Here is an attempt to implement POSIX.1-2004+ Monotonic Clock: >> >> > http://www.opengroup.org/onlinepubs/9699919799/functions/clock_get

Re: [PATCH] define RTLD_LOCAL

2010-08-08 Thread Václav Haisman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Yaakov (Cygwin/X) wrote, On 8.8.2010 7:49: > POSIX requires RTLD_LOCAL to be defined in [1]. While our > dlopen() does nothing with its second argument, portable software can > rightfully expect the definition to exist alongside the other RTLD_* > m

[PATCH][RFC] POSIX barrier implementation, take 1

2016-02-11 Thread Václav Haisman
Hi. I am attaching a patch that adds (or tries to) POSIX barriers implementation into Cygwin. I have compiled it but not actually tested it, yet. I am dumping it here just in case I get run over by a bus on my way home. :) -- VH diff --git a/newlib/libc/include/sys/features.h b/newlib/libc/incl

[PATCH] POSIX barrier implementation, take 2

2016-02-12 Thread Václav Haisman
Hi. Here is a second take on the POSIX barrier API. This time it is tested with the attached barrier.c file. Here is a change log. Newlib: * libc/include/sys/features.h (_POSIX_BARRIERS): Define for Cygwin. * libc/include/sys/types.h (pthread_barrier_t) (pthread_barriera

Re: [PATCH] POSIX barrier implementation, take 2

2016-02-12 Thread Václav Haisman
On 12.2.2016 15:25, Corinna Vinschen wrote: > Hi Václav, > > > the patch looks pretty good, I have just a few (minor) nits: > > On Feb 12 11:20, Václav Haisman wrote: >> diff --git a/newlib/libc/include/sys/types.h >> b/newlib/libc/include/sys/types.h >> in

Re: [PATCH] POSIX barrier implementation, take 3

2016-02-12 Thread Václav Haisman
On 12.2.2016 15:25, Corinna Vinschen wrote: > Hi Václav, > > > the patch looks pretty good, I have just a few (minor) nits: > > On Feb 12 11:20, Václav Haisman wrote: >> diff --git a/newlib/libc/include/sys/types.h >> b/newlib/libc/include/sys/types.h >> in

Fwd: [PATCH] spinlock spin with pause instruction

2016-03-11 Thread Václav Haisman
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. -- VH diff --git a/win

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

2016-03-12 Thread Václav Haisman
On 12.3.2016 07:25, Mark Geisert wrote: > 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 'pau

Re: [PATCH] Cygwin: define byteswap.h inlines as macros

2016-03-15 Thread Václav Haisman
On 15 March 2016 at 04:13, Yaakov Selkowitz wrote: > The bswap_* "functions" are macros in glibc, so they may be tested for > by the preprocessor (e.g. #ifdef bswap_16). > > Signed-off-by: Yaakov Selkowitz > --- > winsup/cygwin/include/byteswap.h | 14 +- > 1 file changed, 9 insertio

[RFC][patch] cygwin/singal.h is not compatible with -std=c89 or -std=c99

2006-11-25 Thread Václav Haisman
Hi, I've tried to compile following test case with -std=c99 and later with -std=c89 flags and it fails to compile. #include void sigchld_handler (int s) { } int main (void) { struct sigaction sa; sa.sa_handler = sigchld_handler; } The problem is that the declaration of struct sigaction us

Re: wait.h

2008-04-23 Thread Václav Haisman
Yaakov (Cygwin Ports) wrote, On 23.4.2008 21:18: glibc ships a which contains only one line: #include I know of at least three packages that #include instead of . Could such a header please be added to Cygwin (preferably to both branches)? Patch attached; I presume this is trivial enough t

Re: [PATCH] add get_nprocs, get_nprocs_conf

2009-11-12 Thread Václav Haisman
Yaakov (Cygwin/X) wrote: > On 12/11/2009 03:44, Corinna Vinschen wrote: >> In this case I'm rather surprised that these very GNU/Linux specific >> things are *not* in a linux/sysinfo.h file. But it doesn't hurt to keep >> that in line with Linux, right? > > In that case, here is a patch which dec