I'm trying to compile CommonC++ with cygwin (gcc utility and related ported to windows) but sigwait don't work. How to implement sigwait using sigsuspend (supported) ??
In this one case it might be interesting to see if a hybradized operation could be done in cygwin. I think sigwait is only needed to support suspend/resume functionality in pthreads. If one can extract the win32 "handle" for the pthread thread context in cygwin, one could do a native win32 thread suspend and resume call.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, yesterday I tried to compile on a MacOsX (sf compile farm) and have the same problem (not sigwait). Also in MacOsX pthread_kill are not declared, so PosixThread do not compile...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to compile CommonC++ with cygwin (gcc utility and related ported to windows) but sigwait don't work. How to implement sigwait using sigsuspend (supported) ??
Something like
void wait(signo_t signo)
{
sigset_t mask, old;
sigemptyset(&mask);
sigaddset(&mask, signo);
pthread_sigmask(SIG_BLOCK, &mask, &old);
sigsuspend(&mask);
pthread_sigmask(SIG_UNBLOCK, &old, &mask);
}
instead of
void wait(signo_t signo)
{
sigset_t mask;
sigemptyset(&mask);
sigaddset(&mask, signo);
sigwait(&mask, &signo);
}
work (I'm not a posix guru...) ???
In this one case it might be interesting to see if a hybradized operation could be done in cygwin. I think sigwait is only needed to support suspend/resume functionality in pthreads. If one can extract the win32 "handle" for the pthread thread context in cygwin, one could do a native win32 thread suspend and resume call.
Well, yesterday I tried to compile on a MacOsX (sf compile farm) and have the same problem (not sigwait). Also in MacOsX pthread_kill are not declared, so PosixThread do not compile...