<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/lib/libc/tests/sys, branch release/14.4.0</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=release%2F14.4.0'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-01-20T04:06:56Z</updated>
<entry>
<title>libc: report _SC_NPROCESSORS_ONLN more accurately in cpu-limited jails</title>
<updated>2026-01-20T04:06:56Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-10-29T16:32:30Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=b196a718ca0e77685b8e40aaac0911f11604d00c'/>
<id>urn:sha1:b196a718ca0e77685b8e40aaac0911f11604d00c</id>
<content type='text'>
We don't support CPU hotplug, but we do support cpuset(8) restrictions
on jails (including prison0, which uses cpuset 1).  The process cannot
widen its cpuset beyond its root set, so it makes sense to instead
report the number of cpus enabled there rather than the total number
in the system.

This change is effectively a nop for the majority of systems and jails
in the wild, though it does reduce the performance of this query now
that we can't take advantage of AT_NCPUS being provided in the auxinfo.

The implementation here is notably different than Linux, which would not
take cgroups into account.  They do, however, take CPU hotplug into
account, so the possibility for it to diverge from (and be lower than)
the # configured count to reflect what the process can actually be
scheduled on doesn't really diverge in semantics.

Reviewed by:	kib

(cherry picked from commit d617806aac1469319970e3551656e9deabb98a35)
</content>
</entry>
<entry>
<title>libc/powerpc64: Fix swapcontext(3)</title>
<updated>2025-07-21T02:56:59Z</updated>
<author>
<name>Timothy Pearson</name>
<email>tpearson@raptorengineering.com</email>
</author>
<published>2025-07-08T13:41:15Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=6e211ff4902a4cab3552b7bc21b9688a7f0e6dbd'/>
<id>urn:sha1:6e211ff4902a4cab3552b7bc21b9688a7f0e6dbd</id>
<content type='text'>
On PowerPC platforms a valid link to the Table of Contents (TOC) is
required for PLT lookups to function.  This TOC pointer is stored in
a dedicated register, and is used along with the stack pointer by both
C prologue and PLT lookup code.

When calling swapcontext() with uc_link != NULL, a PLT lookup to
setcontext(3) is attempted from within the _ctx_done context.  The
exiting process has usually trashed both r1 and r2 at this point,
leading to a crash within the PLT lookup before setcontext(2) is
reached to restore the linked context.

Save and restore r2 as in a regular function.  This ensures the
subsequent PLT lookup to setcontext(3) succeeds.

Signed-off-by: Timothy Pearson &lt;tpearson@raptorengineering.com&gt;

MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1759

(cherry picked from commit 8efa35fea384d209c683dfbae8f49f2737a41941)
</content>
</entry>
<entry>
<title>libc/sys: add errno test</title>
<updated>2024-03-02T05:05:05Z</updated>
<author>
<name>Konstantin Belousov</name>
<email>kib@FreeBSD.org</email>
</author>
<published>2024-02-24T23:39:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=8a7d5d73b8493d2921d3c8ae13746e481bd51d26'/>
<id>urn:sha1:8a7d5d73b8493d2921d3c8ae13746e481bd51d26</id>
<content type='text'>
(cherry picked from commit 32fdcff8703da6f2795193acc77ec3c1fb8b723d)
</content>
</entry>
<entry>
<title>libc: Purge unneeded cdefs.h</title>
<updated>2023-11-27T04:20:09Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-01T22:43:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4025b5b527c870cf095ac9531764f4e4d3feaec2'/>
<id>urn:sha1:4025b5b527c870cf095ac9531764f4e4d3feaec2</id>
<content type='text'>
These sys/cdefs.h are not needed. Purge them. They are mostly left-over
from the $FreeBSD$ removal. A few in libc are still required for macros
that cdefs.h defines. Keep those.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D42385

(cherry picked from commit 559a218c9b257775fb249b67945fe4a05b7a6b9f)
</content>
</entry>
<entry>
<title>Remove a few more stray __FBSDID uses</title>
<updated>2023-10-24T17:08:46Z</updated>
<author>
<name>John Baldwin</name>
<email>jhb@FreeBSD.org</email>
</author>
<published>2023-09-25T14:49:52Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=5db9e9e29605616f071fc6a4cb01ff464d47848f'/>
<id>urn:sha1:5db9e9e29605616f071fc6a4cb01ff464d47848f</id>
<content type='text'>
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41954

(cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50)
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>urn:sha1:d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:42Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=1d386b48a555f61cb7325543adbbb5c3f3407a66'/>
<id>urn:sha1:1d386b48a555f61cb7325543adbbb5c3f3407a66</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>urn:sha1:4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
</entry>
<entry>
<title>netbsd-tests: Serialize message queue tests</title>
<updated>2023-03-10T22:07:06Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2023-03-10T22:07:06Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e1ccf64b884a1a47c48a2fb7d71e7eb18347c6d6'/>
<id>urn:sha1:e1ccf64b884a1a47c48a2fb7d71e7eb18347c6d6</id>
<content type='text'>
They can fail when run in parallel since they all share a global queue
key.

MFC after:	1 week
</content>
</entry>
<entry>
<title>sendfile_test: fix copy-paste bug</title>
<updated>2022-02-24T23:05:12Z</updated>
<author>
<name>Eric van Gyzen</name>
<email>vangyzen@FreeBSD.org</email>
</author>
<published>2022-02-24T22:53:03Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=a8fea07c3053293f35e00b9073b33ff6f1d9a067'/>
<id>urn:sha1:a8fea07c3053293f35e00b9073b33ff6f1d9a067</id>
<content type='text'>
Require the newly opened file descriptor to be good, instead of
re-requiring the one that was required three lines earlier.
Thankfully, opening /dev/null is really unlikely to fail.

Reported by:	Coverity
MFC after:	1 week
Sponsored by:	Dell EMC Isilon
</content>
</entry>
</feed>
