* init.cc: Cleanup slightly and remove obsolete code.

This commit is contained in:
Christopher Faylor 2002-09-16 16:09:54 +00:00
parent 4e78617321
commit d04cf16c52
5 changed files with 21 additions and 30 deletions

View File

@ -1,3 +1,7 @@
2002-09-16 Christopher Faylor <cgf@redhat.com>
* init.cc: Cleanup slightly and remove obsolete code.
2002-09-11 Robert Collins <rbtcollins@hotmail.com> 2002-09-11 Robert Collins <rbtcollins@hotmail.com>
* init.cc (dll_entry): On thread detach, if the thread hasn't * init.cc (dll_entry): On thread detach, if the thread hasn't

View File

@ -1,6 +1,6 @@
/* init.cc /* init.cc
Copyright 1996, 1997, 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
This file is part of Cygwin. This file is part of Cygwin.
@ -42,19 +42,6 @@ WINAPI dll_entry (HANDLE h, DWORD reason, void *static_load)
* but we need to clean it up */ * but we need to clean it up */
thisthread->exit(0); thisthread->exit(0);
} }
#if 0 // FIXME: REINSTATE SOON
waitq *w;
if ((w = waitq_storage.get ()) != NULL)
{
if (w->thread_ev != NULL)
{
system_printf ("closing %p", w->thread_ev);
(void) CloseHandle (w->thread_ev);
}
memset (w, 0, sizeof(*w)); // FIXME: memory leak
}
// FIXME: Need to add other per_thread stuff here
#endif
break; break;
} }
return 1; return 1;

View File

@ -1,6 +1,6 @@
/* pthread.cc: posix pthread interface for Cygwin /* pthread.cc: posix pthread interface for Cygwin
Copyright 1998, 1999, 2000, 2001 Red Hat, Inc. Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Originally written by Marco Fuykschot <marco@ddi.nl> Originally written by Marco Fuykschot <marco@ddi.nl>

View File

@ -377,8 +377,8 @@ pthread::setTlsSelfPointer(pthread *thisThread)
/* member methods */ /* member methods */
pthread::pthread ():verifyable_object (PTHREAD_MAGIC), win32_obj_id (0), pthread::pthread ():verifyable_object (PTHREAD_MAGIC), win32_obj_id (0),
cancelstate (0), canceltype (0), cancel_event(0), cancelstate (0), canceltype (0), cancel_event(0),
joiner (NULL), cleanup_stack(NULL) joiner (NULL), cleanup_stack(NULL)
{ {
} }
@ -739,7 +739,7 @@ pthread::setcancelstate (int state, int *oldstate)
else else
{ {
if (oldstate) if (oldstate)
*oldstate = cancelstate; *oldstate = cancelstate;
cancelstate = state; cancelstate = state;
} }
@ -760,7 +760,7 @@ pthread::setcanceltype (int type, int *oldtype)
else else
{ {
if (oldtype) if (oldtype)
*oldtype = canceltype; *oldtype = canceltype;
canceltype = type; canceltype = type;
} }
@ -793,7 +793,7 @@ pthread::pop_cleanup_handler (int const execute)
__pthread_cleanup_handler *handler = cleanup_stack; __pthread_cleanup_handler *handler = cleanup_stack;
if (execute) if (execute)
(*handler->function) (handler->arg); (*handler->function) (handler->arg);
cleanup_stack = handler->next; cleanup_stack = handler->next;
} }