Thread (6 messages) 6 messages, 2 authors, 2020-08-24

Re: [PATCH 1/2] Add a manpage for watch_queue(7)

From: David Howells <dhowells@redhat.com>
Date: 2020-08-24 17:54:12
Also in: keyrings, linux-fsdevel, linux-man, lkml

Ben Boeckel [off-list ref] wrote:
quoted
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.
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help