8 Feb 19:39
12 Feb 23:04
[PATCH] pthread.h: include <time.h>
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-02-12 22:04:02 GMT
2012-02-12 22:04:02 GMT
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
2012-(Continue reading)Feb-?? Yaakov Selkowitz <yselkowitz@...> * include/pthread.h: Include time.h as required by POSIX. Index: include/pthread.h =================================================================== RCS file: /cvs/src/src/winsup/cygwin/include/pthread.h,v retrieving revision 1.35 diff -u -p -r1.35 pthread.h --- include/pthread.h 6 Jan 2012 07:12:18 -0000 1.35 +++ include/pthread.h 12 Feb 2012 21:56:02 -0000 @@ -14,6 +14,7 @@ #include <sys/types.h> #include <signal.h> #include <sched.h> +#include <time.h>
12 Feb 23:28
Re: [PATCH] pthread.h: include <time.h>
Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com>
2012-02-12 22:28:14 GMT
2012-02-12 22:28:14 GMT
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
21 Feb 23:44
[PATCH] Add scandirat(3)
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-02-21 22:44:58 GMT
2012-02-21 22:44:58 GMT
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-(Continue reading)02-?? Yaakov Selkowitz <yselkowitz@...> * 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. Index: cygwin.din =================================================================== RCS file: /cvs/src/src/winsup/cygwin/cygwin.din,v retrieving revision 1.253 diff -u -p -r1.253 cygwin.din --- cygwin.din 28 Jan 2012 14:44:01 -0000 1.253 +++ cygwin.din 21 Feb 2012 11:36:15 -0000 @@ -1406,6 +1406,7 @@ scalbnf NOSIGFE _scalbnf = scalbnf NOSIGFE scandir SIGFE _scandir = scandir SIGFE +scandirat SIGFE
22 Feb 00:03
Re: [PATCH] Add scandirat(3)
Eric Blake <eblake <at> redhat.com>
2012-02-21 23:03:54 GMT
2012-02-21 23:03:54 GMT
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
22 Feb 02:30
Re: [PATCH] Add scandirat(3)
Christopher Faylor <cgf-use-the-mailinglist-please <at> cygwin.com>
2012-02-22 01:30:07 GMT
2012-02-22 01:30:07 GMT
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@...> > > * 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
24 Feb 04:38
[PATCH] Add pthread_getname_np, pthread_setname_np
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-02-24 03:38:15 GMT
2012-02-24 03:38:15 GMT
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
2012-(Continue reading)02-?? Yaakov Selkowitz <yselkowitz@...>
24 Feb 09:38
[PATCH] Add pldd(1)
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2012-02-24 08:38:40 GMT
2012-02-24 08:38:40 GMT
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
2012-(Continue reading)02-?? Yaakov Selkowitz <yselkowitz@...> * Makefile.in (CYGWIN_BINS): Add pldd. (pldd.exe): Add -lpsapi to ALL_LDFLAGS. * pldd.c: New file. * utils.sgml (pldd): New section. Index: Makefile.in =================================================================== RCS file: /cvs/src/src/winsup/utils/Makefile.in,v retrieving revision 1.98 diff -u -p -r1.98 Makefile.in --- Makefile.in 29 Jan 2012 09:41:06 -0000 1.98 +++ Makefile.in 24 Feb 2012 07:44:28 -0000 @@ -53,7 +53,7 @@ MINGW_CXX := ${srcdir}/mingw ${CX # List all binaries to be linked in Cygwin mode. Each binary on this list # must have a corresponding .o of the same name. CYGWIN_BINS := ${addsuffix .exe,cygpath getconf getfacl ldd locale kill mkgroup \ - mkpasswd mount passwd ps regtool setfacl setmetamode ssp tzset umount} + mkpasswd mount passwd pldd ps regtool setfacl setmetamode ssp tzset umount}
24 Feb 10:38
Re: [PATCH] Add pthread_getname_np, pthread_setname_np
Corinna Vinschen <corinna-cygwin <at> cygwin.com>
2012-02-24 09:38:09 GMT
2012-02-24 09:38:09 GMT
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)
24 Feb 10:47
Re: [PATCH] Add pldd(1)
Corinna Vinschen <corinna-cygwin <at> cygwin.com>
2012-02-24 09:47:07 GMT
2012-02-24 09:47:07 GMT
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
RSS Feed