]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man3/pthread_sigqueue.3
fuse.4: ffix
[thirdparty/man-pages.git] / man3 / pthread_sigqueue.3
index ebf995d103ea9df691033f03d03382523e7ec491..d1a37464542386df34e466595a31de02df49c2ef 100644 (file)
@@ -1,5 +1,6 @@
 .\" Copyright (c) 2010 Michael Kerrisk, <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" 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.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
-.TH PTHREAD_SIGQUEUE 3 2010-11-16 "Linux" "Linux Programmer's Manual"
+.TH PTHREAD_SIGQUEUE 3 2017-09-15 "Linux" "Linux Programmer's Manual"
 .SH NAME
 pthread_sigqueue \- queue a signal and data to a thread
 .SH SYNOPSIS
 .nf
+.B #include <signal.h>
 .B #include <pthread.h>
-
-.BI "int pthread_sigqueue(pthread_t *" thread ", int " sig ,
+.PP
+.BI "int pthread_sigqueue(pthread_t " thread ", int " sig ,
 .BI "                     const union sigval " value );
 .fi
-.sp
+.PP
 Compile and link with \fI\-pthread\fP.
-.sp
+.PP
 .in -4n
 Feature Test Macro Requirements for glibc (see
 .BR feature_test_macros (7)):
 .in
-.sp
+.PP
 .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
+.BR sigqueue (3),
+but, rather than sending a signal to a process,
+it sends a signal to a thread in the same process as the
 calling thread.
-
+.PP
 The
 .I thread
-argument is the ID of another thread in the same process as the caller.
+argument is the ID of a 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)
+.BR sigqueue (3)
 for details.
 .SH RETURN VALUE
 On success,
-.BR pthread_create ()
+.BR pthread_sigqueue ()
 returns 0;
 on error, it returns an error number.
 .SH ERRORS
@@ -88,15 +91,35 @@ is not valid.
 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 ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lb lb lb
+l l l.
+Interface      Attribute       Value
+T{
+.BR pthread_sigqueue ()
+T}     Thread safety   MT-Safe
+.TE
 .SH CONFORMING TO
 This function is a GNU extension.
+.SH NOTES
+The glibc implementation of
+.BR pthread_sigqueue ()
+gives an error
+.RB ( EINVAL )
+on attempts to send either of the real-time signals
+used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
 .SH SEE ALSO
+.BR rt_tgsigqueueinfo (2),
 .BR sigaction (2),
-.BR sigqueue (2),
-.BR sigwait (2),
 .BR pthread_sigmask (3),
+.BR sigqueue (3),
+.BR sigwait (3),
 .BR pthreads (7),
-.br SIGNAL (7)
+.BR signal (7)