<feed xmlns='http://www.w3.org/2005/Atom'>
<title>musl/arch/generic/bits, branch master</title>
<subtitle>musl - an implementation of the standard library for Linux-based systems</subtitle>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/'/>
<entry>
<title>stdint.h: derive limits from __LONG_MAX, use common fast16 types</title>
<updated>2024-05-07T13:17:51+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2024-05-07T13:17:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=2c124e13bd7941fe0b885eecdc5de6f09aacf06a'/>
<id>2c124e13bd7941fe0b885eecdc5de6f09aacf06a</id>
<content type='text'>
the bits file is retained, but as a single generic version, to allow
for the unlikely future possibility of letting a new arch define
something differently.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the bits file is retained, but as a single generic version, to allow
for the unlikely future possibility of letting a new arch define
something differently.
</pre>
</div>
</content>
</entry>
<entry>
<title>sys/reg.h: derive __WORDSIZE from __LONG_MAX</title>
<updated>2024-05-07T13:08:31+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2024-05-07T13:07:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=e709a6f07ade208ba513f9225222336f30c304b0'/>
<id>e709a6f07ade208ba513f9225222336f30c304b0</id>
<content type='text'>
this removes an otherwise-unnecessary bits header from most archs,
replacing it with an empty generic version.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this removes an otherwise-unnecessary bits header from most archs,
replacing it with an empty generic version.
</pre>
</div>
</content>
</entry>
<entry>
<title>unify bits/stat.h for all archs sharing a common definition</title>
<updated>2024-05-07T12:58:45+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2024-05-07T12:58:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=0dfa1d8caadb7b308740d7695b592c207bfad543'/>
<id>0dfa1d8caadb7b308740d7695b592c207bfad543</id>
<content type='text'>
future archs should not define their own bits/stat.h but use this
generic one.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
future archs should not define their own bits/stat.h but use this
generic one.
</pre>
</div>
</content>
</entry>
<entry>
<title>make generic bits/fcntl.h shareable with 64-bit archs</title>
<updated>2020-09-03T21:58:17+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-09-03T21:58:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=76f42fdf34b518ab4b1f0684209d3e1e60e92d9c'/>
<id>76f42fdf34b518ab4b1f0684209d3e1e60e92d9c</id>
<content type='text'>
the fcntl file locking command macro values in the existing generic
bits/fcntl.h were the "64" variants, requiring 64-bit archs that use
the "plain" variants to have their own bits/fcntl.h, even if they
otherwise use the common definitions for everything.

since commit 7cc79d10afd43811a486fd5e9fcdf8e45ac599e0 exposed
__LONG_MAX to all bits headers, we can now make the generic one common
between 32- and 64-bit archs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the fcntl file locking command macro values in the existing generic
bits/fcntl.h were the "64" variants, requiring 64-bit archs that use
the "plain" variants to have their own bits/fcntl.h, even if they
otherwise use the common definitions for everything.

since commit 7cc79d10afd43811a486fd5e9fcdf8e45ac599e0 exposed
__LONG_MAX to all bits headers, we can now make the generic one common
between 32- and 64-bit archs.
</pre>
</div>
</content>
</entry>
<entry>
<title>move struct dirent to bits header, allow NAME_MAX to vary</title>
<updated>2020-01-26T04:08:55+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2020-01-26T04:08:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=614c9e7b1eecb71c5718c34f1724e8758cbe3c27'/>
<id>614c9e7b1eecb71c5718c34f1724e8758cbe3c27</id>
<content type='text'>
this is not necessary for linux but is a simple, inexpensive change to
make that facilitates ports to systems where NAME_MAX needs to be
longer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
this is not necessary for linux but is a simple, inexpensive change to
make that facilitates ports to systems where NAME_MAX needs to be
longer.
</pre>
</div>
</content>
</entry>
<entry>
<title>move time64 ioctl numbers to generic bits/ioctl.h</title>
<updated>2019-11-02T22:30:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-11-02T00:22:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=b60fdf133c033d4ad6b04a8237f253563fae5928'/>
<id>b60fdf133c033d4ad6b04a8237f253563fae5928</id>
<content type='text'>
now that all 32-bit archs have 64-bit time types, the values for the
time-related ioctls can be shared. the mechanism for this is an
arch/generic version of the bits header. archs which don't use the
generic header still need to duplicate the definitions.

x32, which does not use the new time64 values of the macros, already
has its own overrides, so this commit does not affect it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
now that all 32-bit archs have 64-bit time types, the values for the
time-related ioctls can be shared. the mechanism for this is an
arch/generic version of the bits header. archs which don't use the
generic header still need to duplicate the definitions.

x32, which does not use the new time64 values of the macros, already
has its own overrides, so this commit does not affect it.
</pre>
</div>
</content>
</entry>
<entry>
<title>move msghdr and cmsghdr out of bits/socket.h</title>
<updated>2019-11-02T22:30:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-11-01T03:09:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=a0252bc75b8546008c6b87e58344c4340683d5eb'/>
<id>a0252bc75b8546008c6b87e58344c4340683d5eb</id>
<content type='text'>
these structures can now be defined generically in terms of endianness
and long size. previously, the 32-bit archs all shared a common
definition from the generic bits header, and each 64-bit arch had to
repeat the 64-bit version, with endian conditionals if the arch had
variants of each endianness.

I would prefer getting rid of the preprocessor conditionals for
padding and instead using unnamed bitfield members, like commit
9b2921bea1d5017832e1b45d1fd64220047a9802 did for struct timespec.
however, at present sendmsg, recvmsg, and recvmmsg need access to the
padding members by name to zero them. this could perhaps be cleaned up
in the future.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
these structures can now be defined generically in terms of endianness
and long size. previously, the 32-bit archs all shared a common
definition from the generic bits header, and each 64-bit arch had to
repeat the 64-bit version, with endian conditionals if the arch had
variants of each endianness.

I would prefer getting rid of the preprocessor conditionals for
padding and instead using unnamed bitfield members, like commit
9b2921bea1d5017832e1b45d1fd64220047a9802 did for struct timespec.
however, at present sendmsg, recvmsg, and recvmmsg need access to the
padding members by name to zero them. this could perhaps be cleaned up
in the future.
</pre>
</div>
</content>
</entry>
<entry>
<title>define LONG_MAX via arch alltypes.h, strip down bits/limits.h</title>
<updated>2019-10-17T23:23:39+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-10-17T23:19:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=7cc79d10afd43811a486fd5e9fcdf8e45ac599e0'/>
<id>7cc79d10afd43811a486fd5e9fcdf8e45ac599e0</id>
<content type='text'>
LLONG_MAX is uniform for all archs we support and plenty of header and
code level logic assumes it is, so it does not make sense for limits.h
bits mechanism to pretend it's variable.

LONG_BIT can be defined in terms of LONG_MAX; there's no reason to put
it in bits.

by moving LONG_MAX definition to __LONG_MAX in alltypes.h and moving
LLONG_MAX out of bits, there are now no plain-C limits that are
defined in the bits header, so the bits header only needs to be
included in the POSIX or extended profiles. this allows the feature
test macro logic to be removed from the bits header, facilitating a
long-term goal of getting such logic out of bits.

having __LONG_MAX in alltypes.h will allow further generalization of
headers.

archs without a constant PAGESIZE no longer need bits/limits.h at all.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLONG_MAX is uniform for all archs we support and plenty of header and
code level logic assumes it is, so it does not make sense for limits.h
bits mechanism to pretend it's variable.

LONG_BIT can be defined in terms of LONG_MAX; there's no reason to put
it in bits.

by moving LONG_MAX definition to __LONG_MAX in alltypes.h and moving
LLONG_MAX out of bits, there are now no plain-C limits that are
defined in the bits header, so the bits header only needs to be
included in the POSIX or extended profiles. this allows the feature
test macro logic to be removed from the bits header, facilitating a
long-term goal of getting such logic out of bits.

having __LONG_MAX in alltypes.h will allow further generalization of
headers.

archs without a constant PAGESIZE no longer need bits/limits.h at all.
</pre>
</div>
</content>
</entry>
<entry>
<title>move IPC_STAT definition to a new bits/ipcstat.h file</title>
<updated>2019-08-02T04:08:23+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-08-01T00:35:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=006a75a99789f383713e4f47affd7c90e39cc827'/>
<id>006a75a99789f383713e4f47affd7c90e39cc827</id>
<content type='text'>
otherwise, 32-bit archs that could otherwise share the generic
bits/ipc.h would need to duplicate the struct ipc_perm definition,
obscuring the fact that it's the same. sysvipc is not widely used and
these headers are not commonly included, so there is no performance
gain to be had by limiting the number of indirectly included files
here.

files with the existing time32 definition of IPC_STAT are added to all
current 32-bit archs now, so that when it's changed the change will
show up as a change rather than addition of a new file where it's less
obvious that the value is changing vs the generic one that was used
before.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
otherwise, 32-bit archs that could otherwise share the generic
bits/ipc.h would need to duplicate the struct ipc_perm definition,
obscuring the fact that it's the same. sysvipc is not widely used and
these headers are not commonly included, so there is no performance
gain to be had by limiting the number of indirectly included files
here.

files with the existing time32 definition of IPC_STAT are added to all
current 32-bit archs now, so that when it's changed the change will
show up as a change rather than addition of a new file where it's less
obvious that the value is changing vs the generic one that was used
before.
</pre>
</div>
</content>
</entry>
<entry>
<title>move IPC_64 from public bits/ipc.h to syscall_arch.h</title>
<updated>2019-07-30T18:23:56+00:00</updated>
<author>
<name>Rich Felker</name>
<email>dalias@aerifal.cx</email>
</author>
<published>2019-07-30T17:07:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.musl-libc.org/cgit/musl/commit/?id=f56d57f8a7aa536d40014933841a8b22f9c10328'/>
<id>f56d57f8a7aa536d40014933841a8b22f9c10328</id>
<content type='text'>
the definition of the IPC_64 macro controls the interface between libc
and the kernel through syscalls; it's not a public API. the meaning is
rather obscure. long ago, Linux's sysvipc *id_ds structures used
16-bit uids/gids and wrong types for a few other fields. this was in
the libc5 era, before glibc. the IPC_64 flag (64 is a misnomer; it's
more like 32) tells the kernel to use the modern[-ish] versions of the
structures.

the definition of IPC_64 has nothing to do with whether the arch is
32- or 64-bit. rather, due to either historical accident or
intentional obnoxiousness, the kernel only accepts and masks off the
0x100 IPC_64 flag conditional on CONFIG_ARCH_WANT_IPC_PARSE_VERSION,
i.e. for archs that want to provide, or that accidentally provided,
both. for archs which don't define this option, no masking is
performed and commands with the 0x100 bit set will fail as invalid. so
ultimately, the definition is just a matter of matching an arbitrary
switch defined per-arch in the kernel.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
the definition of the IPC_64 macro controls the interface between libc
and the kernel through syscalls; it's not a public API. the meaning is
rather obscure. long ago, Linux's sysvipc *id_ds structures used
16-bit uids/gids and wrong types for a few other fields. this was in
the libc5 era, before glibc. the IPC_64 flag (64 is a misnomer; it's
more like 32) tells the kernel to use the modern[-ish] versions of the
structures.

the definition of IPC_64 has nothing to do with whether the arch is
32- or 64-bit. rather, due to either historical accident or
intentional obnoxiousness, the kernel only accepts and masks off the
0x100 IPC_64 flag conditional on CONFIG_ARCH_WANT_IPC_PARSE_VERSION,
i.e. for archs that want to provide, or that accidentally provided,
both. for archs which don't define this option, no masking is
performed and commands with the 0x100 bit set will fail as invalid. so
ultimately, the definition is just a matter of matching an arbitrary
switch defined per-arch in the kernel.
</pre>
</div>
</content>
</entry>
</feed>
