This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [PATCH] pthread_attr_getstack{,addr}, pthread_getattr_np
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Mon, 2 May 2011 16:11:24 -0400
- Subject: Re: [PATCH] pthread_attr_getstack{,addr}, pthread_getattr_np
- References: <1304350389.6972.11.camel@YAAKOV04>
- Reply-to: cygwin-patches at cygwin dot com
On Mon, May 02, 2011 at 10:33:09AM -0500, Yaakov (Cygwin/X) wrote:
>This implements pthread_attr_getstack(), pthread_attr_getstackaddr, and
>pthread_getattr_np(), which I need for webkitgtk.
>
>In essence, I added a stackaddr member to pthread_attr, which is
>accessed (slightly differently) by pthread_attr_getstack{,attr},
>behaving just as on Linux. The bulk of the work is to support
>pthread_getattr_np, which provides the real attributes of the given
>thread, including the real stack address and size.
>
>The pthread_attr_setstack{,addr} setters are not implemented, as I have
>yet to find a way to set the thread stack address on Windows. For that
>reason I'm not defining _POSIX_THREAD_ATTR_STACKADDR, as the feature is
>not yet (fully) implemented.
Cygwin already plays with the stack address. It has to for situations
when you call fork() from a thread.
>Patches for winsup/cygwin and winsup/doc, as well as a sample program
>for Cygwin and Linux, attached.
The patch looks good. Please check in.
Thanks.
cgf