When we get a clock interrupt, we should not
call sched() when the process is not in "Running" state
as it is already committed to call sched() itself.
(An example is qlock(), just after the unlock() call).
As this is basically the same check as done in
preempted(), unify both and add a "clockintr"
argument to preempted().
Then most trap handlers just become:
preempted(irq());
Also, we do not want to call preempted() for traps,
as the trap handler has just setup some machine
state to resolve the trap. We can wait for the
clock interrupt if we really need the preempt.
On pnp(), just allocate descriptors and bring the controller
in a halted state.
Start the controller and dma in attach().
This prevents MAME from locking up when there is ethernet
traffic during bootup.
Before each arch had to implement the _privates array
themselves in assembly, which meant it was quite easy
for them to get out of sync. This cleans this up to be
a single enum and shares this initialization code.
we used to compare the symbol to nodret->s to see if
we got the return pointer, but this is wrong as
nodret is a OIND, pointing to a ONAME and therefore
sym would be nil.
instead, just compare the symbol string to ".ret".
Variables are lists, just as in rc,
so preserve emptry strings ('')
in variables properly: FOO='' bar baz
should result in FOO=('' bar baz) in
the environment, while FOO=
becomes a emptry list FOO=().
Get rid of the Evy struct, the environment
can be represented as just an array
of Symtab pointers, also meaning the
value can never be out of sync.
Embedd the name string in Symtab struct.
It is immutable and dont require
the caller to strdup() the name.
Make Word's immutable, embedding the
string value in the Word struct.
This avoids alot of extra allocations.
Provide a Strdup() function that handles
allocation error.
Handle variable overrides from the
command line internally, avoiding the
maketmp() file.
When executing a recipe, pass the body
using the -c flag to rc, avoiding
a pipe() and fork(). This also has
the advntage that rc can optimize the
script as it sees it in its entirety
and avoid fork() down the line.
Make sure not to leak file-descriptors
into sub-processes.
Do an attempt at freeing memory
(mostly for Arc's and environment values).
Maintain a QLock.pc and RWLock.wpc field which is
the callerpc() of the last owner of the qlock/wlock.
The previous patch that set QLock.use.pc was
kind of nonsensical as it will get overridden
by the next attempt to acquire the qlock.
> this fixes multicast on hypervisors without a command queue
> for the ethernet interface, like OpenBSD.
> Right now the driver does not install a multicast function when
> no command queue is ava> ilable.
> This breaks multicast because the network stack errors out in
> netif.c:netmulti.
> To fix this, move the check for the queue to the multicast and
> promiscuous functions and install those functions unconditionally.
SMB 2/3 is not supported by cifsd, so clarify that in the man page and update teh code to mention in the log file if SMB2/3 is attempted. Also, while in the code, fix a typo, add a few more commands to the explicitly unsupported list, and align the return value for unsupported calls to the SMBv1 spec.
Keeping the PC for the qlock call isn't very useful,
since it's always going to be the same PC. Instead,
set the Lock's pc to the pc of the QLock locker.
On 64-bit platforms, when the index being 32-bit unsigned,
any calculation there must be done modulo 2^32,
but rearranging the factors into the address calculation
is done in signed 64-bits yielding the wrong index.
In constrast to .safe, the .ret variable can
be registerized just fine which can avoid
some quite ugly code in functions manipulating
a returned struct.
This also fixes the sparc and 68020 libc, since their mkfiles
referenced a dummy cycles.c that was never in their subdir.
Likewise while the 68000 libc would build, linking a program
against it would fail due to missing a _tas implementation.
This copies the 68020 implementation to alleviate this.
The new TBZ/TBNZ instructions use imm14 displacement (±32K 4-byte
instruction aligned), so have to check constant pool more often.
Also, make the absolute pc value vlong.
As we want to keep applying dmat translations
when bypassing a wifi interface, make the
dmat handling code part of devether instead
of doing it internally in the wifi driver.
The wifi driver just needs to allocate and
assign Ether.dmat pointer.
when link-status on secondary is lost, always switch
back to the primary regardless of if it has a link.
this works around some ethernet driver not setting
link-status consistently and wifi's that might
only indicate a link when connected to an ap.
Recent realtek models will not send packets if rx/tx is enabled before
configuration is complete. Additionally, the RXDV gate should be enabled
to put traffic on the fifo instead of the DMA controller.
this follows OpenBSD's sys/dev/pci/if_rge.c and FreeBSD's sys/dev/re/if_re.c
When inserting an object into cache, we try to remove objects
from cache to keep the size below the limit. If the object is
larger than the cache, we try to unload not only every cached
object, but the object we're in the process of inserting.
This leads to an immediate unload of the object, which is very
wrong.
- putting the dash and label on their own line breaks an assumption
in /sys/lib/man/secindex
- /sys/man/1/INDEX will then have an entry '^ git$' instead of
'^git git$'
- if by luck or by being deuteron man is passed the argument '-?',
it is interpreted as a query, not an option
- '^-? ' is searched for and matches the ' git' line
- man -? (or '-?') displays git(1) instead of erroring with
'no manual page'
- make sure the hash-file has non-zero hlen field (avoid division by zero)
- bound the chain walking by hlen, so we wont end up in a infinite loop
- always check for NDBNAP (nil) pointer while walking chain
- verify chain pointers (must be multiple of NDBPLEN and not overlap hashtable)
when opening /lib/ndb/local, the db returned is the first entry
in the database= tuple, not the file passed to ndbopen(),
so search for the file in question.
make sure the file-offset doesnt exceed the NDBSPEC bit (23-bit).
remove the created hash file on error, and set TMP bit.