aboutsummaryrefslogtreecommitdiffstats
path: root/man3/pthread_sigqueue.3
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2010-11-16 07:48:01 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2010-11-16 07:48:01 +0100
commitd56af11baa8258f12944ca0ce9121c7cb797875b (patch)
tree5697647a93bb608f7a83bc0d051a870618958b15 /man3/pthread_sigqueue.3
parente7d8245112e992bb2e77a5345d1822783dca60fa (diff)
downloadman-pages-d56af11baa8258f12944ca0ce9121c7cb797875b.tar.gz
pthread_sigqueue.3: New page documenting ptrhead_sigqueue()
pthread_sigqueue() is new in glibc 2.11 (requires a kernel with rt_tgsigqueinfo(), added in Linux 2.6.31). Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3/pthread_sigqueue.3')
-rw-r--r--man3/pthread_sigqueue.3103
1 files changed, 103 insertions, 0 deletions
diff --git a/man3/pthread_sigqueue.3 b/man3/pthread_sigqueue.3
new file mode 100644
index 0000000000..8634c28f01
--- /dev/null
+++ b/man3/pthread_sigqueue.3
@@ -0,0 +1,103 @@
+.\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com>
+.\"
+.\" Permission is granted to make and distribute verbatim copies of this
+.\" manual provided the copyright notice and this permission notice are
+.\" preserved on all copies.
+.\"
+.\" Permission is granted to copy and distribute modified versions of this
+.\" manual under the conditions for verbatim copying, provided that the
+.\" entire resulting derived work is distributed under the terms of a
+.\" permission notice identical to this one.
+.\"
+.\" Since the Linux kernel and libraries are constantly changing, this
+.\" manual page may be incorrect or out-of-date. The author(s) assume no
+.\" responsibility for errors or omissions, or for damages resulting from
+.\" the use of the information contained herein. The author(s) may not
+.\" have taken the same level of care in the production of this manual,
+.\" which is licensed free of charge, as they might when working
+.\" professionally.
+.\"
+.\" Formatted or processed versions of this manual, if unaccompanied by
+.\" the source, must acknowledge the copyright and authors of this work.
+.\"
+.TH PTHREAD_SIGQUEUE 3 2010-11-16 "Linux" "Linux Programmer's Manual"
+.SH NAME
+pthread_sigqueue \- queue a signal and data to a thread
+.SH SYNOPSIS
+.nf
+.B #include <pthread.h>
+
+.BI "int pthread_sigqueue(pthread_t *" thread ", int " sig ,
+.BI " const union sigval " value );
+.fi
+.sp
+Compile and link with \fI\-pthread\fP.
+.sp
+.in -4n
+Feature Test Macro Requirements for glibc (see
+.BR feature_test_macros (7)):
+.in
+.sp
+.BR pthread_sigqueue ():
+_GNU_SOURCE
+.SH DESCRIPTION
+The
+.BR pthread_sigqueue ()
+function performs a similar task to
+.BR sigqueue (2),
+but, rather than sending a signal to another process,
+it sends a signal to another thread in the same process as the
+calling thread.
+
+The
+.I thread
+argument is the ID of another thread in the same process as the caller.
+The
+.I sig
+argument specifies the signal to be sent.
+The
+.I value
+argument specifies data to accompany the signal; see
+.BR sigqueue (2)
+for details.
+.SH RETURN VALUE
+On success,
+.BR pthread_create ()
+returns 0;
+on error, it returns an error number.
+.SH ERRORS
+.TP
+.B EAGAIN
+The limit of signals which may be queued has been reached.
+(See
+.BR signal (7)
+for further information.)
+.TP
+.B EINVAL
+.I sig
+was invalid.
+.TP
+.B ENOSYS
+.BR pthread_sigqueue ()
+is not supported on this system.
+.TP
+.B ESRCH
+.I thread
+is not valid.
+.SH VERSIONS
+The
+.BR pthread_sigqueue ()
+function first appeared in glibc 2.11.
+It is implemented using the Linux-specific
+.BR rt_tgsigqueinfo ()
+system call, which was added in Linux 2.6.31.
+.SH CONFORMING TO
+This function is a GNU extension.
+.SH SEE ALSO
+.\" FIXME Add SEE ALSO in sigqueue.2, signal(7), pthreads(7)
+.BR sigaction (2),
+.BR sigqueue (2),
+.BR sigwait (2),
+.BR pthread_sigmask (3),
+.BR pthreads (7),
+.br SIGNAL (7)