posix_sigwait.cpp 458 B

123456789101112131415161718192021
  1. //
  2. // $Id$
  3. //
  4. #include<__vic/posix/thread.h>
  5. #include<__vic/throw_errno.h>
  6. #include<signal.h>
  7. namespace __vic { namespace posix {
  8. //----------------------------------------------------------------------------
  9. int this_thread::sigwait(const ::sigset_t &set)
  10. {
  11. int sig;
  12. if(int err = ::sigwait(&set, &sig)) throw_errno("sigwait", err);
  13. return sig;
  14. }
  15. //----------------------------------------------------------------------------
  16. }} // namespace