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 | |
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')
-rw-r--r-- | winsup/cygwin/ChangeLog | 8 | ||||
-rw-r--r-- | winsup/cygwin/cygwin.din | 1 | ||||
-rw-r--r-- | winsup/cygwin/include/cygwin/version.h | 3 | ||||
-rw-r--r-- | winsup/cygwin/include/pthread.h | 1 | ||||
-rw-r--r-- | winsup/cygwin/posix.sgml | 1 | ||||
-rw-r--r-- | winsup/cygwin/thread.cc | 18 |
6 files changed, 31 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a696795..8744cc8 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2012-01-06 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + + * 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. + 2012-01-02 Christopher Faylor <me.cygwin2011@cgf.cx> * path.cc (get_current_dir_name): Avoid memory leak. Don't return PWD diff --git a/winsup/cygwin/cygwin.din b/winsup/cygwin/cygwin.din index b46839c..b2a974f 100644 --- a/winsup/cygwin/cygwin.din +++ b/winsup/cygwin/cygwin.din @@ -1270,6 +1270,7 @@ pthread_setschedparam SIGFE pthread_setschedprio SIGFE pthread_setspecific SIGFE pthread_sigmask SIGFE +pthread_sigqueue SIGFE pthread_suspend SIGFE pthread_spin_destroy SIGFE pthread_spin_init SIGFE diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h index 5504583..7b4b207 100644 --- a/winsup/cygwin/include/cygwin/version.h +++ b/winsup/cygwin/include/cygwin/version.h @@ -427,12 +427,13 @@ details. */ 256: Add CW_ALLOC_DRIVE_MAP, CW_MAP_DRIVE_MAP, CW_FREE_DRIVE_MAP. 257: Export getpt. 258: Export get_current_dir_name. + 259: Export pthread_sigqueue. */ /* Note that we forgot to bump the api for ualarm, strtoll, strtoull */ #define CYGWIN_VERSION_API_MAJOR 0 -#define CYGWIN_VERSION_API_MINOR 258 +#define CYGWIN_VERSION_API_MINOR 259 /* There is also a compatibity version number associated with the shared memory regions. It is incremented when incompatible diff --git a/winsup/cygwin/include/pthread.h b/winsup/cygwin/include/pthread.h index 8aa734a..f56de00 100644 --- a/winsup/cygwin/include/pthread.h +++ b/winsup/cygwin/include/pthread.h @@ -202,6 +202,7 @@ void pthread_testcancel (void); /* Non posix calls */ int pthread_getattr_np (pthread_t, pthread_attr_t *); +int pthread_sigqueue (pthread_t *, int, const union sigval); int pthread_suspend (pthread_t); int pthread_continue (pthread_t); int pthread_yield (void); diff --git a/winsup/cygwin/posix.sgml b/winsup/cygwin/posix.sgml index 185964f..bba9f07 100644 --- a/winsup/cygwin/posix.sgml +++ b/winsup/cygwin/posix.sgml @@ -1133,6 +1133,7 @@ also IEEE Std 1003.1-2008 (POSIX.1-2008).</para> pow10f ppoll pthread_getattr_np + pthread_sigqueue ptsname_r removexattr setxattr 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 |