* cygthread.h (cygthread::terminate_thread): Reflect return value.
* cygthread.cc (cygthread::detach): Be more careful about ensuring that sigwait is properly waited for to avoid later missynchronization. (cygthread::terminate_thread): Return true if thread was actually terminated and all handles were closed. * fhandler_base.cc (fhandler_base::raw_read): Use signal_read_state rather than raw calls to win32 api. (fhandler_base::read): Ditto. * fhandler.h (fhandler_pipe::fixup_after_exec): Use method to create read_state signalling. (fhandler_pipe::create): Ditto. * Makefile.in: Make some more files -fomit-frame-pointer.
This commit is contained in:
@ -193,6 +193,15 @@ class fhandler_base
|
||||
virtual void fixup_before_fork_exec (DWORD) {}
|
||||
virtual void fixup_after_fork (HANDLE);
|
||||
virtual void fixup_after_exec () {}
|
||||
void create_read_state (LONG n)
|
||||
{
|
||||
read_state = CreateSemaphore (&sec_none_nih, 0, n, NULL);
|
||||
}
|
||||
|
||||
void signal_read_state (LONG n)
|
||||
{
|
||||
(void) ReleaseSemaphore (read_state, n, NULL);
|
||||
}
|
||||
|
||||
void set_fs_flags (DWORD flags) { fs_flags = flags; }
|
||||
bool get_fs_flags (DWORD flagval = UINT32_MAX)
|
||||
|
Reference in New Issue
Block a user