* cygthread.h (cygthread::terminate_thread): Mark private.
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range thread stuff.
This commit is contained in:
parent
cbdc3d1780
commit
3786526ea8
@ -1,3 +1,9 @@
|
|||||||
|
2003-06-02 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
|
* cygthread.h (cygthread::terminate_thread): Mark private.
|
||||||
|
* cygthread.cc (cygthread::terminate_thread): Deallocate free_range
|
||||||
|
thread stuff.
|
||||||
|
|
||||||
2003-06-02 Corinna Vinschen <corinna@vinschen.de>
|
2003-06-02 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
|
* fhandler_socket.cc (fhandler_socket::accept): Rename `signalled'
|
||||||
|
@ -258,11 +258,16 @@ cygthread::terminate_thread ()
|
|||||||
system_printf ("VirtualFree of allocation base %p<%p> failed, %E",
|
system_printf ("VirtualFree of allocation base %p<%p> failed, %E",
|
||||||
stack_ptr, m.AllocationBase);
|
stack_ptr, m.AllocationBase);
|
||||||
|
|
||||||
|
if (is_freerange)
|
||||||
|
free (this);
|
||||||
|
else
|
||||||
|
{
|
||||||
h = NULL;
|
h = NULL;
|
||||||
__name = NULL;
|
__name = NULL;
|
||||||
stack_ptr = NULL;
|
stack_ptr = NULL;
|
||||||
(void) InterlockedExchange (&inuse, 0); /* No longer in use */
|
(void) InterlockedExchange (&inuse, 0); /* No longer in use */
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Detach the cygthread from the current thread. Note that the
|
/* Detach the cygthread from the current thread. Note that the
|
||||||
theory is that cygthreads are only associated with one thread.
|
theory is that cygthreads are only associated with one thread.
|
||||||
|
@ -22,6 +22,7 @@ class cygthread
|
|||||||
static bool exiting;
|
static bool exiting;
|
||||||
static DWORD WINAPI stub (VOID *);
|
static DWORD WINAPI stub (VOID *);
|
||||||
static DWORD WINAPI simplestub (VOID *);
|
static DWORD WINAPI simplestub (VOID *);
|
||||||
|
void terminate_thread ();
|
||||||
public:
|
public:
|
||||||
static const char * name (DWORD = 0);
|
static const char * name (DWORD = 0);
|
||||||
cygthread (LPTHREAD_START_ROUTINE, LPVOID, const char *);
|
cygthread (LPTHREAD_START_ROUTINE, LPVOID, const char *);
|
||||||
@ -33,7 +34,6 @@ class cygthread
|
|||||||
void * operator new (size_t);
|
void * operator new (size_t);
|
||||||
static cygthread *freerange ();
|
static cygthread *freerange ();
|
||||||
void exit_thread ();
|
void exit_thread ();
|
||||||
void terminate_thread ();
|
|
||||||
static void terminate ();
|
static void terminate ();
|
||||||
bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);}
|
bool SetThreadPriority (int nPriority) {return ::SetThreadPriority (h, nPriority);}
|
||||||
void zap_h ()
|
void zap_h ()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user