The standard is pretty explicit that misaligned pointers is UB and LLVM
does exploit the promised alignment on SPARC, resulting in kernel
crashes during early boot.
Since it's headerless this is important so the data can be interpreted
properly. Also, ordinary audio ioctls cannot be used on a pad and the
format can't be changed, so applications that attempt to automatically
determine the format of a device like audiorecord don't work.
restore it _after_ the call to __errno(). Fixes sending the
__errno() call off to nowhereland when this code is included
in another library (eg __posix_cerror() in libposix). Failure
picked up by the ATF lib/libposix/posix1/t_rename test.
Do it properly and only enable thread-safety, but not the worker thread
support. The latter is what requires the whole libpthread dependency.
A potential compromis would be to use a weak pthread_create and only
enable worker threads if it is provided, but given that it is only
really used for large sorts, don't bother for now.
Require caller to pass a buffer and size if they
want the tempfile not unlinked.
Add Job_TempFile to handle blocking signals around
call to mkTempFile, so that meta_open_filemon can use it
in jobs mode.
used by platform description mechanisms like OpenFirmware, Device Tree,
and ACPI. In addition to encapsulating the handle's opaque value, the
handle also contains a pointer to an "implementation", which can be used
to invoke methods on a device / device handle.
Device handles are designed to be passed around by-value. It is expected
that any other memory objects they refer to will be durable. They are an
aggregate type that consumes 2 pointers worth of storage space.
When device_t's are created, they initially have an invalid device handle.
It is currently the responsibility of platform-specific code to assign
device handles to device_t's.
When necessary, platform-specific code can override a handle's implementation
in a way that resembles sub-classing, such that specific methods can by
intercepted, but others simply passed through. This also allows platforms
that do not otherwise have a platform description mechanism to provide
handle implementations in specific circumstances to describe the hardware
to platform-independent code.
A general device method calling infrastructure is provided. Method names
that begin with "device-" are reserved for / defined by the autoconfiguration
subsystem. Define the "device-enumerate-children" method. Other subsystems
are free to define their own device method calls and bindings.
Welcome to NetBSD 9.99.80.
In an experiment, I tried to separate the concepts of a GNode and a
variable scope. The global variables SCOPE_GLOBAL, SCOPE_INTERNAL and
SCOPE_CMDLINE are implemented as GNode even though they only need the
members 'name' and 'vars'. All their other members are unused.
Therefore it seemed natural to extract this part of the GNode into a
separate type called Scope.
The resulting code was harder to read though since it had split the
namespace of the functions into several parts that were not obviously
related: The Var_ functions, the Scope_ functions, and the short-cut
Global_ functions. Because of this, I threw away the experiment.
All that is left are a few updated comments.
This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.
No functional change.