Before, it was possible to add routes before
the interface existed.
The routes would look for their interface lazily
as the route was looked up, but this leads to
all kinds of hard to explain behaviour when
a interface goes away and the routes start
wandering to a different interface on their
own which they will stick to when a new
interface comes up that would match the route
better.
Instead, we have routes always associated
to their desination interface and remove
the routes when the interface gets unbound.
It is no longer possible to add routes for
interfaces that do not exist.
This is easier to reason about behaviour as
well as allows us to get rid of canrlock(ifc)
in findipifc().
All routes inside the routing tree are now
by definition up-to-date (as long as we
hold the routelock).
Callers of v4lookup()/v6lookup() still should
check if the ifcid of the interface still
matches the route once they have acquired
the interface lock.
Now, *maxmem and *ncpu are not required to be provided.
They will be detected automatically from the QEMU device
tree. Further, >4GB memory configurations are also supported.
The maximum number of CPUs is 16 for now, and the maximum
supported memory is 16GB
I get every hour a delay of the echo replies for as
long as 20 seconds causing reconnects.
It does recover however and sends all the replies
eventually.
In 6? and 8? JMP works a bit uniquely,
when passed a function name it always encodes
as a JMP* instead of a JMP. This means
JMP myfunc(SB)
always assume that myfunc is a function pointer, not
a function itself. The new JMPF instead has the same
semantics as CALL and matches B and JMP in other
assemblers. This allows for a small optimization in
our 386 and amd64 entrypoint by avoiding a jump between
_main and _callmain.
At startup, look for audio devices like /dev/audio*
and open the first one that shows up.
We allow to later changing the audio device using
the new "new" control message to /dev/audio.
Only devices named /dev/audio*, #u/audio* and #A/audio*
are allowd so far to prevent accidents.
Move the "double-ready" check into queueproc() function,
doing it while holding the runq lock, meaning
all transitions to Ready state are serialized.
We do not just check for double-ready but for any
"illegal" transisions:
ready() on Dead, Moribund, New, Ready, Running and Waitrelease
is not allowed.
ready() on Queueing*, Wakeme, Broken, Stopped and Rendez
is only valid when done from another process.
For rescheduling, we have to go to Scheding state
before calling ready(). (rebalance(), schedinit()...)
The EDF scheduler had this bug where it could ready() multiple
times as it was staying in Waitrelease state after releasing
the edflock. Now it transitions thru Scheding avoiding
the issue.
Some callers of unlock change the process state
(such as qlock()) which means they are committed
to calling sched() anyway, so no ned to call it
internally.
Move waserror()/poperror() out of the loop,
so we can also catch errors from canacquire().
This is theoretically possible if memory has
been paged out and we get I/O errors when
trying to page it back in.
For ready() to check invalid state transitions,
we want to ensure that ready() is never called
on a dead proc (or one that is currently dying),
however when we create a new process,
its initial state was "Dead" until is is ready()d.
Instead, introduce the state "New", which is
set when the proc is removed from the freelist
by newproc(), making New -> Ready -> Running
state transition valid.
Also make sure we never leave notes to deadly
processes or ones that are in "Broken" state.
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.