envstat(8) and the envsys framework:
- Modify the ENVSYS_SETDICTIONARY ioctl to support the following
plist structure:
<dict>
<key>foo0</key>
<array>
<dict>
<key>index</key>
<string>sensor0</string>
<key>description</key>
<string>cpu temp</string>
...
Another property for this sensor
...
</dict>
...
Another dictionary for other sensor
...
</array>
...
Another device as above
...
</dict>
Multiple devices with multiple sensors can now be specified, that means
that to set the properties only one copyin(9) is needed now.
- Added the ENVSYS_REMOVEPROPS ioctl, that accepts a boolean object
"envsys-remove-props" and when set to true, all properties that were
set previously by ENVSYS_SETDICTIONARY will be removed. That means that
you can now set multiple critical limits, descriptions and all they
will be removed or changed to its default value (for rfact and
description objects).
- Added the 'index' and 'allow-rfact' objects into the sensor dictionaries,
for better interactivity with userland. To know the position of the
sensor and to know if sensor allows to change the rfact.
- Misc cosmetic changes for consistency.
- Use a two clause license for all my code.
at the same time and the code accessed to an unexistent dictionary:
- Rather than using a global dictionary, use a singly linked list to
access to the dictionaries, one per event.
- When the dictionary has been sent to userland, destroy it and remove
it from the list.
With that change it is possible to receive multiple events at the
same time without panics; again thanks to rmind@ for comments and help
with locking.
Reviewed and ok by rmind.
mpacpi.c 1.48.12.2 from jmcneill-pm:
Don't process the MADT and modify the interrupt config at one moment and
later trying to figure out if an entry was overriden and matches the
ACPI SCI. This is brain-dead and breaks in various situations.
Just check for each ISA override entry, if it matches the SCI. If it
does, remember it and use it for the interrupt setup. If there's no such
override assume that it is not changed, but override the polarity and
level from ISA settings to PCI settings.
When changing the redirection entry for an interrupt, write the
high 32bit first. The low 32bit contain the mask bit and removing
that before setting the destionation ID can lead to lost interrupts.
(it does but has a side-effect) or .text (which is probably ok, but
still less kosher).
Make section macros work for traditional cpp (I guess we haven't used
that for a *long* time, b/c it was broken).
Use __unused instead of explicit attribute for __COPYRIGHT (to be
changed in the next commit).
Define __KERNEL_COPYRIGHT in terms of __COPYRIGHT rather than
duplicating the logic and accidentally inverting it.
Results in identical obj tree for an i386 build modulo ar archives
(with timestamps embedded) and few .o files (and programs they are
part of) that embed timestamps as strings.
instead of adding/subtracting our own IPv4 header.
There are many benefits: gre(4) needn't grok the outer encapsulation
header any longer, so this simplifies the gre(4) code. The IP
stack needn't grok GRE, so it is simplified, too. gre(4) will
benefit from optimizations in the socket code. Eventually, gre(4)
will gain an IPv6 encapsulation with very few new lines of code.
There is a small performance loss. A 133 MHz, 486-class AMD Elan
sinks/sources a TCP stream over GRE with about 93% the throughput
of the old code. TCP throughput on a 266 MHz, 586-class AMD Geode
is about 96% the throughput of the old code. A 175-MHz ADM5120
(MIPS) only sinks a TCP stream over GRE at about 90% of the old
code; I am still investigating that.
I produced stripped-down versions of sosend() and soreceive() for
gre(4) to use. They are guaranteed not to block, so they can be
called from a software interrupt and from a socket upcall,
respectively.
A kernel thread is no longer necessary for socket transmit/receive,
but I didn't get around to removing it, yet.
Thanks to Matt Thomas for suggesting the use of stripped-down socket
code and software interrupts, and to Andrew Doran for advice and
answers concerning software interrupts, threads, and performance.
calling thread really does yield. The scheduler will adjust it back to a
reasonable level within 1 second. This contradicts POSIX, which specifies
that sched_yield() put the thread onto the back of its current runqueue.
However, POSIX doesn't really have any business specifying what should
happen for SCHED_OTHER (i.e. a timesharing scheduler like ours), and
Java, MySQL and libpthread rely on sched_yield() doing something useful.
- mi_switch: adjust spc_curpriority and newl->l_priority if we avoided
the runqueues and are doing a direct switch. Since nothing currently
does that, there should be no functional change.
closer to its single caller in if_eon.c, try to move fewer bytes
by moving the IP header forward instead of moving the tail of the
mbuf backward, and use m_adj(9) instead of fiddling directly with
mbuf data members.
- When registering command tables, make sure the builtin commands are
already registered
- Make the command table entry structure private
- Do not bother to store the number of commands in a table, we can quickly
calc that if needed.