* cygthread.h (cygthread::terminate_thread): Mark private.
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range thread stuff.
This commit is contained in:
@@ -258,10 +258,15 @@ cygthread::terminate_thread ()
|
||||
system_printf ("VirtualFree of allocation base %p<%p> failed, %E",
|
||||
stack_ptr, m.AllocationBase);
|
||||
|
||||
h = NULL;
|
||||
__name = NULL;
|
||||
stack_ptr = NULL;
|
||||
(void) InterlockedExchange (&inuse, 0); /* No longer in use */
|
||||
if (is_freerange)
|
||||
free (this);
|
||||
else
|
||||
{
|
||||
h = NULL;
|
||||
__name = NULL;
|
||||
stack_ptr = NULL;
|
||||
(void) InterlockedExchange (&inuse, 0); /* No longer in use */
|
||||
}
|
||||
}
|
||||
|
||||
/* Detach the cygthread from the current thread. Note that the
|
||||
|
Reference in New Issue
Block a user