This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] check for valid pthread_self pointer


This patch should fix the problem with the ipc-daemon started as service
and threads that are not created by pthread_create.
Actually it will only check for a valid thread_self pointer in different
functions to avoid a SEGV.
The pthread functions therefore can not be used within a service main
thread or a thread started by CreateThread (but you can of course
start new threads with pthread_create that can make use of it).

Thomas

Changelog

2002-08-07  Thomas Pfaff  <tpfaff@gmx.net>

	* pthread.cc: Include errno.h.
	(pthread_exit): Check for a valid pthread_self pointer.
	(pthread_setcancelstate): Ditto.
	(pthread_setcanceltype): Ditto.
	(pthread_testcancel): Ditto.
	(_pthread_cleanup_push): Ditto.
	(_pthread_cleanup_pop): Ditto.

Attachment: pthread_self.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]