* pthread.cc (pthread_create): Very minor formatting change.
* timer.cc (timer_thread): Ensure that any created thread defaults to detached state.
This commit is contained in:
parent
f241db6f60
commit
c4cb50b3a8
@ -1,3 +1,9 @@
|
||||
2008-10-07 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* pthread.cc (pthread_create): Very minor formatting change.
|
||||
* timer.cc (timer_thread): Ensure that any created thread defaults to
|
||||
detached state.
|
||||
|
||||
2008-10-06 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* cygtls.h (_cygtls::initialized): Remove bogus stack check which would
|
||||
|
@ -17,7 +17,7 @@ extern "C"
|
||||
{
|
||||
/* ThreadCreation */
|
||||
int
|
||||
pthread_create (pthread_t * thread, const pthread_attr_t * attr,
|
||||
pthread_create (pthread_t *thread, const pthread_attr_t *attr,
|
||||
void *(*start_routine) (void *), void *arg)
|
||||
{
|
||||
return pthread::create (thread, attr, start_routine, arg);
|
||||
|
@ -170,7 +170,17 @@ timer_thread (VOID *x)
|
||||
{
|
||||
pthread_t notify_thread;
|
||||
debug_printf ("%p starting thread", x);
|
||||
int rc = pthread_create (¬ify_thread, tt->evp.sigev_notify_attributes,
|
||||
pthread_attr_t *attr;
|
||||
pthread_attr_t default_attr;
|
||||
if (tt->evp.sigev_notify_attributes)
|
||||
attr = tt->evp.sigev_notify_attributes;
|
||||
else
|
||||
{
|
||||
pthread_attr_init(attr = &default_attr);
|
||||
pthread_attr_setdetachstate (attr, PTHREAD_CREATE_DETACHED);
|
||||
}
|
||||
|
||||
int rc = pthread_create (¬ify_thread, attr,
|
||||
(void * (*) (void *)) tt->evp.sigev_notify_function,
|
||||
tt->evp.sigev_value.sival_ptr);
|
||||
if (rc)
|
||||
|
Loading…
Reference in New Issue
Block a user