2 May 2011 17:33
[PATCH] pthread_attr_getstack{,addr}, pthread_getattr_np
Yaakov (Cygwin/X <yselkowitz <at> users.sourceforge.net>
2011-05-02 15:33:09 GMT
2011-05-02 15:33:09 GMT
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
RSS Feed