linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>, linux-man@vger.kernel.org
Subject: [PATCH 18/28] tkill.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too
Date: Sat, 12 Jun 2021 10:31:35 +0200	[thread overview]
Message-ID: <20210612083145.12485-19-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210612083145.12485-1-alx.manpages@gmail.com>

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/tkill.2 | 22 +++++++++++++---------
 1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/man2/tkill.2 b/man2/tkill.2
index a6752591b..6ff930e17 100644
--- a/man2/tkill.2
+++ b/man2/tkill.2
@@ -31,14 +31,22 @@
 tkill, tgkill \- send a signal to a thread
 .SH SYNOPSIS
 .nf
-.BI "int tkill(pid_t " tid ", int " sig );
-.BI "int tgkill(pid_t " tgid ", pid_t " tid ", int " sig );
+.BR "#include <signal.h>" "           /* Definition of " SIG* " constants */"
+.BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
+.B #include <unistd.h>
+.PP
+.BI "int syscall(SYS_tkill, pid_t " tid ", int " sig );
+.PP
+.B #include <signal.h>
+.PP
+.BI "int tgkill, pid_t " tgid ", pid_t " tid ", int " sig );
 .fi
 .PP
 .IR Note :
-There is no glibc wrapper for
-.BR tkill ();
-see NOTES.
+glibc provides no wrapper for
+.BR tkill (),
+necessitating the use of
+.BR syscall (2).
 .SH DESCRIPTION
 .BR tgkill ()
 sends the signal
@@ -138,10 +146,6 @@ in
 .BR clone (2)
 for an explanation of thread groups.
 .PP
-Glibc does not provide a wrapper for
-.BR tkill ();
-call it using
-.BR syscall (2).
 Before glibc 2.30, there was also no wrapper function for
 .BR tgkill ().
 .SH SEE ALSO
-- 
2.32.0


  parent reply	other threads:[~2021-06-12  8:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-12  8:31 [PATCH 00/28] SYNPOSIS: Use syscall() and fix includes Alejandro Colomar
2021-06-12  8:31 ` [PATCH 01/28] seccomp.2: Document why each header is needed Alejandro Colomar
2021-06-12  8:31 ` [PATCH 02/28] seccomp.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-06-12  8:31 ` [PATCH 03/28] spu_create.2: Remove <sys/types.h> Alejandro Colomar
2021-06-12  8:31 ` [PATCH 04/28] spu_create.2: Use syscall(SYS_...), for system calls without a wrapper Alejandro Colomar
2021-06-12  8:31 ` [PATCH 05/28] pipe.2: SYNOPSIS: Fix incorrect prototype Alejandro Colomar
2021-06-12  8:31 ` [PATCH 06/28] spu_run.2: Use syscall(SYS_...), for system calls without a wrapper Alejandro Colomar
2021-06-12  8:31 ` [PATCH 07/28] stat.2: SYNOPSIS: Fix includes Alejandro Colomar
2021-06-12  8:31 ` [PATCH 08/28] statx.2: " Alejandro Colomar
2021-06-12  8:31 ` [PATCH 09/28] subpage_prot.2: Use syscall(SYS_...); for system calls without a wrapper Alejandro Colomar
2021-06-12  8:31 ` [PATCH 10/28] swapon.2: SYNOPSIS: Fix includes Alejandro Colomar
2021-06-12  8:31 ` [PATCH 11/28] symlink.2: ffix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 12/28] syscall.2: wfix + ffix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 13/28] syslog.2: Use syscall(SYS_...); for raw system calls Alejandro Colomar
2021-06-12  8:31 ` [PATCH 14/28] timer_create.2: SYNOPSIS: Document why more than one header is needed Alejandro Colomar
2021-06-12  8:31 ` [PATCH 15/28] s390_guarded_storage.2: tfix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 16/28] s390_runtime_instr.2: tfix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 17/28] s390_sthyi.2: tfix Alejandro Colomar
2021-06-12  8:31 ` Alejandro Colomar [this message]
2021-06-12  8:31 ` [PATCH 19/28] truncate.2: Remove <sys/types.h> Alejandro Colomar
2021-06-12  8:31 ` [PATCH 20/28] umask.2: " Alejandro Colomar
2021-06-12  8:31 ` [PATCH 21/28] unlink.2: ffix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 22/28] userfaultfd.2: Remove unused includes Alejandro Colomar
2021-06-12  8:31 ` [PATCH 23/28] userfaultfd.2: Use syscall(SYS_...); for system calls without a wrapper; fix includes too Alejandro Colomar
2021-06-12  8:31 ` [PATCH 24/28] utime.2: SYNOPSIS: Fix includes Alejandro Colomar
2021-06-12  8:31 ` [PATCH 25/28] utimensat.2: ffix Alejandro Colomar
2021-06-12  8:31 ` [PATCH 26/28] vmsplice.2: Remove unneeded include Alejandro Colomar
2021-06-12  8:31 ` [PATCH 27/28] wait.2: Remove <sys/types.h> Alejandro Colomar
2021-06-12  8:31 ` [PATCH 28/28] wait4.2: SYNOPSIS: Remove includes Alejandro Colomar
2021-06-20  2:44 ` [PATCH 00/28] SYNPOSIS: Use syscall() and fix includes Michael Kerrisk (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210612083145.12485-19-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).