[PATCH] pthread_attr_getstack{,addr}, pthread_getattr_np

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Mon May 2 15:33:00 GMT 2011


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.

Patches for winsup/cygwin and winsup/doc, as well as a sample program
for Cygwin and Linux, attached.


Yaakov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_attr_getstack.patch
Type: text/x-patch
Size: 10171 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20110502/26959032/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc-pthread_attr_getstack.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20110502/26959032/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread-attr-test.c
Type: text/x-csrc
Size: 1046 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20110502/26959032/attachment-0002.bin>


More information about the Cygwin-patches mailing list