Thread (2 messages) flat view 2 messages, 2 authors, 2020-12-18

Re: Please remove all bit fields in bpf uapi

From: Florian Weimer <hidden>
Date: 2020-12-18 11:05:39
Also in: bpf

* Greg KH:
On Fri, Dec 18, 2020 at 05:09:58PM +0800, Meng Zhuo wrote:
quoted
Hi, Greg

Thank you for your reply
It's fine to do compile bit fields "by hand".
Surely Go has something like "if (field & 0x01)", right?  That's all you
need for a bitfield.

Look at the most common syscall, open(2)?  It uses bitfields, why
can't Go handle that?
Flag arguments are very different from bit-fields in struct types.

Structs with bit-fields are not part of the highly portable C subset.
Even C compilers differ in their interpretation.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help