public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Cc: mtk.manpages@gmail.com, linux-man <linux-man@vger.kernel.org>
Subject: Re: sigprocmask.2: s/kernel_sigset_t/sigset_t/
Date: Sun, 14 Feb 2021 09:42:46 +0100	[thread overview]
Message-ID: <bce03b20-6557-a80a-c05a-b243ced8e2d9@gmail.com> (raw)
In-Reply-To: <cacaff50-f077-37f0-87c6-df2feed9ddcb@gmail.com>

On 2/14/21 12:30 AM, Alejandro Colomar (man-pages) wrote:
> On 2/13/21 5:05 PM, Michael Kerrisk (man-pages) wrote:
>> Hi Alex,
>>
>> On 2/12/21 4:28 PM, Alejandro Colomar (man-pages) wrote:
>>> Hi Michael,
>>>
>>> AFAICT, the syscalls [rt_]sigprocmask use '[old_]sigset_t' (there's the
>>> '__user' modifier too), so 'kernel_' should be removed from the types,
>>> shouldn't it?
>>
>> Looks like you're right. Will you send a patch?
>>
>> Thanks,
>>
>> Michael
> 
> Hi Michael,
> 
> I was wrong!

D'oh! I should read the manual page!

Cheers,

Michael

> [[
>    C library/kernel differences
>        The kernel's definition of sigset_t differs  in  size  from
>        that  used by the C library.  In this manual page, the for‐
>        mer is referred to as kernel_sigset_t (it  is  nevertheless
>        named sigset_t in the kernel sources).
> 
>        The  glibc  wrapper function for sigprocmask() silently ig‐
>        nores attempts to block the two real-time signals that  are
>        used  internally by the NPTL threading implementation.  See
>        nptl(7) for details.
> 
>        The original Linux system  call  was  named  sigprocmask().
>        However,  with  the  addition of real-time signals in Linux
>        2.2,  the  fixed-size,  32-bit  sigset_t  (referred  to  as
>        old_kernel_sigset_t  in this manual page) type supported by
>        that system call was no longer  fit  for  purpose.   Conse‐
>        quently,  a new system call, rt_sigprocmask(), was added to
>        support an enlarged sigset_t  type  (referred  to  as  ker‐
>        nel_sigset_t  in  this  manual  page).  The new system call
>        takes a fourth argument, size_t sigsetsize, which specifies
>        the  size  in  bytes  of the signal sets in set and oldset.
>        This argument is currently required to have a fixed  archi‐
>        tecture specific value (equal to sizeof(kernel_sigset_t)).
> 
>        The  glibc  sigprocmask()  wrapper function hides these de‐
>        tails from us, transparently calling rt_sigprocmask()  when
>        the kernel provides it.
> ]]
> 
> 
> 


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

      reply	other threads:[~2021-02-14  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-12 15:28 sigprocmask.2: s/kernel_sigset_t/sigset_t/ Alejandro Colomar (man-pages)
2021-02-13 16:05 ` Michael Kerrisk (man-pages)
2021-02-13 16:41   ` Alejandro Colomar (man-pages)
2021-02-13 23:30   ` Alejandro Colomar (man-pages)
2021-02-14  8:42     ` Michael Kerrisk (man-pages) [this message]

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=bce03b20-6557-a80a-c05a-b243ced8e2d9@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /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