* cygthread.cc (cygthread::create): Fix incorrect use of name rather than
__name. * cygthread.h (cygthread::cygthread): Create versions which eliminate 'n' parameter. * dcrt0.cc (dll_crt0_1): Remove check for threadfunc_ix. Remove obsolete comments. Set process_state to active here. * fhandler_netdrive.cc (create_thread_and_wait): Use shortened cygthread constructor. * timer.cc (timer_tracker::settime): Ditto. * window.cc (HWND): Ditto. * fhandler_tty.cc: Use shortened cygthread constructor, where appropriate, throughout. * select.cc: Ditto. * fork.cc (frok::child): Remove wait_for_sigthread. (fork): Reformat if for slightly better clarity. * init.cc (dll_finished_loading): New variable. (dll_entry): Use dll_finished_loading to determine when we should call merge_threadfunc. * sigproc.cc (no_signals_available): Simplify by using my_readsig. (wait_sig_inited): Delete. (wait_sig): Define as void function. (pending_signals): Accommodate change to wait_sig definition. (wait_for_sigthread): Delete definition. (sigproc_init): Initialize signal pipe here, before wait_sig thread is created. Use void form of cygthread creation. (init_sig_pipe): Delete. (wait_sig): Return void rather than DWORD. Assume previous initialization of signal pipe. Set my_sendsig to NULL when exiting. * sigproc.h (wait_for_sigthread): Delete declaration.
This commit is contained in:
@@ -188,7 +188,7 @@ out:
|
||||
void
|
||||
cygthread::create ()
|
||||
{
|
||||
thread_printf ("name %s, id %p", name, id);
|
||||
thread_printf ("name %s, id %p, this %p", __name, id, this);
|
||||
HANDLE htobe;
|
||||
if (h)
|
||||
{
|
||||
@@ -197,7 +197,7 @@ cygthread::create ()
|
||||
while (!thread_sync)
|
||||
yield ();
|
||||
SetEvent (thread_sync);
|
||||
thread_printf ("activated name '%s', thread_sync %p for thread %p", name, thread_sync, id);
|
||||
thread_printf ("activated name '%s', thread_sync %p for id %p", __name, thread_sync, id);
|
||||
htobe = h;
|
||||
}
|
||||
else
|
||||
@@ -206,8 +206,8 @@ cygthread::create ()
|
||||
htobe = CreateThread (&sec_none_nih, 0, is_freerange ? simplestub : stub,
|
||||
this, 0, &id);
|
||||
if (!htobe)
|
||||
api_fatal ("CreateThread failed for %s - %p<%p>, %E", name, h, id);
|
||||
thread_printf ("created name '%s', thread %p, id %p", name, h, id);
|
||||
api_fatal ("CreateThread failed for %s - %p<%p>, %E", __name, h, id);
|
||||
thread_printf ("created name '%s', thread %p, id %p", __name, h, id);
|
||||
#ifdef DEBUGGING
|
||||
terminated = false;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user