diff options
author | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-01-06 07:12:18 +0000 |
---|---|---|
committer | Yaakov Selkowitz <yselkowi@redhat.com> | 2012-01-06 07:12:18 +0000 |
commit | 50350cafb37500a6cf5c1550cfcb2041af1a535a (patch) | |
tree | ff4e3d6a83802f971f1b3040d87712703ea6c800 /winsup/cygwin/thread.cc | |
parent | 1f94817747280040ae0b4b4af917fba3214255a8 (diff) | |
download | newlib-50350cafb37500a6cf5c1550cfcb2041af1a535a.zip newlib-50350cafb37500a6cf5c1550cfcb2041af1a535a.tar.gz newlib-50350cafb37500a6cf5c1550cfcb2041af1a535a.tar.bz2 |
* cygwin.din (pthread_sigqueue): Export.
* posix.sgml (std-gnu): Add pthread_sigqueue.
* thread.cc (pthread_sigqueue): New function.
* include/thread.h (pthread_sigqueue): New function.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r-- | winsup/cygwin/thread.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 9ca4675..d2a6704 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -3093,6 +3093,24 @@ pthread_sigmask (int operation, const sigset_t *set, sigset_t *old_set) return res; } +extern "C" int +pthread_sigqueue (pthread_t *thread, int sig, const union sigval value) +{ + siginfo_t si = {0}; + + if (!pthread::is_good_object (thread)) + return EINVAL; + if (!(*thread)->valid) + return ESRCH; + + si.si_signo = sig; + si.si_code = SI_QUEUE; + si.si_value = value; + si.si_pid = myself->pid; + si.si_uid = myself->uid; + return sig_send (NULL, si, (*thread)->cygtls); +} + /* ID */ extern "C" int |