public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: me@benboeckel.net
Cc: dhowells@redhat.com, mtk.manpages@gmail.com,
	torvalds@linux-foundation.org, keyrings@vger.kernel.org,
	linux-fsdevel@vger.kernel.org, linux-man@vger.kernel.org,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] Add a manpage for watch_queue(7)
Date: Mon, 24 Aug 2020 18:54:01 +0100	[thread overview]
Message-ID: <348448.1598291641@warthog.procyon.org.uk> (raw)
In-Reply-To: <20200824165802.GB408760@erythro.dev.benboeckel.internal>

Ben Boeckel <me@benboeckel.net> wrote:

> > One loss message.  I set a flag on the last slot in the pipe ring to say that
> > message loss occurred, but there's insufficient space to store a counter
> > without making the slot larger (and I really don't want to do that).
> > 
> > Note that every slot in the pipe ring has such a flag, so you could,
> > theoretically, get a loss message after every normal message that you read
> > out.
> 
> Ah, so a "you lost something" is just a flag on the next event that does
> make it into the queue? I read it as a whole message existed indicating
> that data was lost. Not sure of the best wording here.

No.  That flag is internal.  It causes read() to fabricate a message and
insert it into the user buffer after the flagged message has been copied over.

> > bit 0 is 2^0 in this case.  I'm not sure how better to describe it.
> 
> OK, so the bits are in native-endian order in the enclosing bytes. But C
> just doesn't have a set ABI for bitfields (AFAIK), so I guess it's
> "whatever GCC does" in practice?

Hard to say - powerpc and s390 have bit 0 as the MSB:-/

But "& (1 << 0)" gets you 2^0, whatever the CPU book says.

David


  reply	other threads:[~2020-08-24 17:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07 15:06 [PATCH 1/2] Add a manpage for watch_queue(7) David Howells
2020-08-07 15:06 ` [PATCH 2/2] Modify the pipe(2) manpage for notification queues David Howells
2020-08-07 16:05 ` [PATCH 1/2] Add a manpage for watch_queue(7) Ben Boeckel
2020-08-24 15:27   ` David Howells
2020-08-24 16:58     ` Ben Boeckel
2020-08-24 17:54       ` David Howells [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-08-24 15:30 David Howells
2020-08-27 11:54 ` 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=348448.1598291641@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=me@benboeckel.net \
    --cc=mtk.manpages@gmail.com \
    --cc=torvalds@linux-foundation.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