else
{
info->stack_ptr = &arg;
+ debug_printf ("thread '%s', id %p, stack_ptr %p", info->name (), info->id, info->stack_ptr);
if (!info->ev)
{
info->ev = CreateEvent (&sec_none_nih, TRUE, FALSE, NULL);
while (!thread_sync)
low_priority_sleep (0);
SetEvent (thread_sync);
- thread_printf ("activated thread_sync %p", thread_sync);
+ thread_printf ("activated name '%s', thread_sync %p for thread %p", thread_sync, id);
}
else
{
this, 0, &id);
if (!h)
api_fatal ("thread handle not set - %p<%p>, %E", h, id);
- thread_printf ("created thread %p", h);
+ thread_printf ("created name '%s', thread %p, id %p", __name, h, id);
#ifdef DEBUGGING
terminated = false;
#endif
ResetEvent (*this);
ResetEvent (thread_sync);
}
+
+ debug_printf ("thread '%s', id %p, inuse %d, stack_ptr %p", name (), id, inuse, stack_ptr);
+ while (inuse && !stack_ptr)
+ low_priority_sleep (0);
+
if (!inuse)
return;
+
(void) TerminateThread (h, 0);
(void) WaitForSingleObject (h, INFINITE);
- if (!inuse)
+ if (!inuse || exiting)
return;
CloseHandle (h);
- while (inuse && !stack_ptr)
- low_priority_sleep (0);
-
if (!inuse)
return;
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_95 = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:true,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_95osr2 = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:true,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_98 = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:true,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_98se = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:true,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_me = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:true,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:true
};
static NO_COPY wincaps wincap_nt3 = {
has_terminal_services:false,
has_switch_to_thread:false,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:false
};
static NO_COPY wincaps wincap_nt4 = {
has_terminal_services:false,
has_switch_to_thread:true,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:false
};
static NO_COPY wincaps wincap_nt4sp4 = {
has_terminal_services:false,
has_switch_to_thread:true,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:false
};
static NO_COPY wincaps wincap_2000 = {
has_terminal_services:true,
has_switch_to_thread:true,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:false
+ has_ioctl_storage_get_media_types_ex:false,
+ start_proc_suspended:false
};
static NO_COPY wincaps wincap_xp = {
has_terminal_services:true,
has_switch_to_thread:true,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:true
+ has_ioctl_storage_get_media_types_ex:true,
+ start_proc_suspended:false
};
static NO_COPY wincaps wincap_2003 = {
has_terminal_services:true,
has_switch_to_thread:true,
cant_debug_dll_entry:false,
- has_ioctl_storage_get_media_types_ex:true
+ has_ioctl_storage_get_media_types_ex:true,
+ start_proc_suspended:false
};
wincapc wincap;