Christian Franke | 8 Feb 19:39 2012
Picon

[PATCH] Fix C++ compilation of wait(NULL)

This fixes the regression I introduced in sys/wait.h.

Sorry, and thanks for the bug report.

Christian

Yaakov (Cygwin/X | 12 Feb 23:04 2012
Picon
Picon

[PATCH] pthread.h: include <time.h>

POSIX states:
> Inclusion of the <pthread.h> header shall make symbols defined in the
> headers <sched.h> and <time.h> visible.

The reason being that some pthread functions take a clockid_t argument,
and the CLOCK_* symbolic names are therein defined.

Patch attached.

Yaakov

Christopher Faylor | 12 Feb 23:28 2012

Re: [PATCH] pthread.h: include <time.h>

On Sun, Feb 12, 2012 at 04:04:02PM -0600, Yaakov (Cygwin/X) wrote:
>POSIX states:
>> Inclusion of the <pthread.h> header shall make symbols defined in the
>> headers <sched.h> and <time.h> visible.
>
>The reason being that some pthread functions take a clockid_t argument,
>and the CLOCK_* symbolic names are therein defined.
>
>Patch attached.

Looks good.  Please check in.

Thanks.

cgf

Yaakov (Cygwin/X | 21 Feb 23:44 2012
Picon
Picon

[PATCH] Add scandirat(3)

scandirat(3) was added in glibc-2.15[1] and has supposedly been proposed
for addition to POSIX.1[2].  Patch attached.

Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
[2] http://article.gmane.org/gmane.linux.man/2419

Attachment (cygwin-scandirat.patch): text/x-patch, 4250 bytes
Eric Blake | 22 Feb 00:03 2012
Picon

Re: [PATCH] Add scandirat(3)

On 02/21/2012 03:44 PM, Yaakov (Cygwin/X) wrote:
> scandirat(3) was added in glibc-2.15[1] and has supposedly been proposed
> for addition to POSIX.1[2].  Patch attached.

I haven't yet seen anyone propose it for POSIX, but it would indeed be a
welcome addition there.

Also it would be a welcome addition to have pathconfat(), although this
hasn't yet happened on the Linux side of things, let alone any POSIX
proposal.

At any rate, +1 for having this in cygwin.

--

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Christopher Faylor | 22 Feb 02:30 2012

Re: [PATCH] Add scandirat(3)

On Tue, Feb 21, 2012 at 04:44:58PM -0600, Yaakov (Cygwin/X) wrote:
>scandirat(3) was added in glibc-2.15[1] and has supposedly been proposed
>for addition to POSIX.1[2].  Patch attached.
>
>
>Yaakov
>
>[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
>[2] http://article.gmane.org/gmane.linux.man/2419
>

>2012-02-??  Yaakov Selkowitz <yselkowitz <at> ...>
>
>	* cygwin.din (scandirat): Export.
>	* posix.sgml (std-gnu): Add scandirat.
>	* syscalls.cc (scandirat): New function.
>	* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
>	* include/sys/dirent.h (scandirat): Declare.

Looks good.  Please apply.

Thanks, as always.

cgf

Yaakov (Cygwin/X | 24 Feb 04:38 2012
Picon
Picon

[PATCH] Add pthread_getname_np, pthread_setname_np

This patchset adds pthread_getname_np and pthread_setname_np.  These
were added to glibc in 2.12[1] and are also present in some form on
NetBSD and several UNIXes.  IIUC recent versions of GDB can benefit from
this support.

The code is based on NetBSD's implementation with changes to better
match Linux behaviour.  It does differ from Linux in two points:

* The thread name is not affected by changing __progname (or
program_invocation_short_name on Linux).  I used the latter because it
is cheaper than the pinfo->progname dance (e.g. in
format_process_stat()).

* pthread_setname_np(thr, NULL) segfaults on Linux (and NetBSD), but our
snprintf is apparently more robust and treats it as an empty string.

I'll leave it up to you to decide if either of these matter.

I implemented this via class pthread_attr to make it easier to add
pthread_attr_[gs]etname_np (present in NetBSD and some UNIXes) should it
ever be added to Linux (or we decide we want it anyway).

Patches and test code attached.

Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS
(Continue reading)

Yaakov (Cygwin/X | 24 Feb 09:38 2012
Picon
Picon

[PATCH] Add pldd(1)

The pldd(1) command apparently originates from Solaris and was added to
glibc-2.15[1].  Patches and new file attached.

Yaakov

[1] http://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS
Attachment (pldd.c): text/x-csrc, 3725 bytes
Attachment (utils-pldd.patch): text/x-patch, 2089 bytes
Attachment (doc-pldd.patch): text/x-patch, 681 bytes
Corinna Vinschen | 24 Feb 10:38 2012

Re: [PATCH] Add pthread_getname_np, pthread_setname_np

On Feb 23 21:38, Yaakov (Cygwin/X) wrote:
> This patchset adds pthread_getname_np and pthread_setname_np.  These
> were added to glibc in 2.12[1] and are also present in some form on
> NetBSD and several UNIXes.  IIUC recent versions of GDB can benefit from
> this support.

Thanks for your patch, but I don't think it's the whole thing.

Consider, if you implement pthread_[gs]etname_np as you did, then you
have pthread names which are only available to the process in which
the threads are running.  So, how could GDB get the information for
its inferior process?

Actually GDB reads the thread name using a target specific function
which is so far only implemented for Linux.  It does not use
pthread_getname_np, rather it reads the name from /proc/$PID/task/$TID/comm.

And that's a bit of a problem in Cygwin.  Every Cygwin process is
multi-threaded (think signals), but only the application-started threads
are pthreads.

So, again, thanks for doing this, but I think this requires more work to
be useful.  The basic task is to provide /proc/$PID/task for all threads
running in a Cygwin process.  If that's available, the pthread_[gs]etname_np
will become useful and their (different) implementation probably falls into
place.

Corinna

--

-- 
(Continue reading)

Corinna Vinschen | 24 Feb 10:47 2012

Re: [PATCH] Add pldd(1)

On Feb 24 02:38, Yaakov (Cygwin/X) wrote:
> The pldd(1) command apparently originates from Solaris and was added to
> glibc-2.15[1].  Patches and new file attached.

Looks good, works fine.  Please apply.

Thanks,
Corinna

--

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Gmane