For big mailboxes with imap4d, ignoring the index and trying to scan
the mailbox concurrently is not very productive. Just wait for the
other upas/fs to write the whole index.
The issue is that imap might time out and make another connection
spawning even more upas/fs instances that all then try to rebuild
the index concurrently.
this breaks interrupt key handling in rio. theres also no
point in trying todo so as rio sends the note to the whole
process group so the subcommand should have got the note
already.
just wait for the subprocess to terminate.
the date, from and replyto fields where unstable, in that the value
read depended on the state of the cache.
fixing the from and replyto fields is easy, we just handle the
substitution in parsebody().
the date field however requires us to put the date822 into the index
so it can be recovered without requiering to reparse the header
(and body, as we might have a message/rfc822 message with promoted
fields).
with these changes, the fields will be consistent and independnet
of the cache state.
a small optimization also has been added:
after parsing the body, attachments and substitution of from/replyto,
the boundary and unixfrom strings are not needed anymore and can
be freed early.
When read() failed, we were casting the -1 return to
unsigned, which would cause us to index out of bounds.
found using dovecot imap test suite. While we're here,
let's remove the stray debug prints.
widen and move the KMAP window to a new address so we can
handle the 8GB of physical memory of the new raspberry pi4.
the new memory map on pi4 uses the following 4 banks:
0x000000000 0x03e600000
0x040000000 0x0fc000000 <- soc.dramsize (only < 4GB)
0x100000000 0x180000000
0x180000000 0x200000000
On the 8GB variant of the raspberry pi 4,
the eeprom chip for the xhci controller is missing and
instead loaded from sdram (by the gpu firmware).
for this, the gpu firmware needs to be notified of
the xhci controllers pci bus address (after reset)
that was assigned by our pci enumeration code.
parsing the unixheader in mdir fetch routine is the wrong place,
as no invalid character handling has been performed yet. also
the string is not neccesarily null terminated.
avoid duplication with plan9 mbox parsing and just do it in
parseheaders(), which already handles faking the unix headers
for pop3 and imap.
instruction cache maintenance is done on tlb miss;
when a page gets fauled in; with putmmu() checking
the page->txtflush cpu bitmap.
syssegflush() used to only call flushmmu() after
segflush() for the calling process, but when a segment
is shared with other processes, we have to flush the
other processes tlb as well.
this adds the missing procflushseg() call into segflush().
note that procflushseg() leaves the calling process alone,
so the flushmmu() call in syssegflush() is still required.
segmentioproc() does not need to call flushmmu() after
segflush() as it is never going to jump to the modified
page, hence the stale icache does not matter.
make sure we look for the end of the header within the
pointer range, and not accidentally read beyond hend.
also, messages are not null terminated, so this could
even go beyond the email data buffer.
get rid of mimeflag which was only used for some assert
checks.
take header length into account when comparing header
against ignored header strings.
The sample frequency is an artificial parameter used for
isochronous out transfers to better match the target
frequency (usually, a sound card).
when hz is set, devusb adjusts the endpoint's maxpkt to get
the requested frequency and a multiple of the samplesize per
packet.
however, when hz is not set, then we should calculate the
frequency from maxpkt, ntds and pollival, so all parameters
will be consistent with each other.
this breaks the sample from the seconds manpage, and overall
produces funky results. this needs alot more testing.
term% seconds '23 may 2011'
seconds: tmparse: invalid date 23 may 2011 near 'may 2011'
term% seconds '2019-01-01 00:00:00'
-118370073600
Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.
As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.
The last commit missed a few removals, and made it
unnecessarily hard to do an update.
Redo date handling in libc almost entirely. This allows
handling dates and times from outside your timezones,
fixes timezone loading in multithreaded applications,
and allows parsing and formatting using custom format
strings.
As a test of the APIs, we replace the formatting code in
seconds(1), shrinking it massively.
Go expects the error to be one of the three errors returned in
Bell Labs Plan 9. As listed in
f7ba82d68f/src/cmd/go/internal/lockedfile/lockedfile_plan9.go (L16):
// Opening an exclusive-use file returns an error.
// The expected error strings are:
//
// - "open/create -- file is locked" (cwfs, kfs)
// - "exclusive lock" (fossil)
// - "exclusive use file already open" (ramfs)
var lockedErrStrings = [...]string{
"file is locked",
"exclusive lock",
"exclusive use file already open",
}
This brings acme scrolling behaviour in line with that of 9front's rio
and sam, where the amount scrolled varies with a vertical position of
the pointer within the window, similar to how the scrollbar works.
At some point it would be good to implement a line-at-a-time scrolling
when the Shift key is pressed, as seen in rio. For this to happen the
acme keyboard input needs to be rewritten in terms of /dev/kbd instead
of relying on keyboard(2) -- that is, the /dev/cons interface.
Added a ver= field to the filter to distinguish the ip version.
By default, a filter is parsed as ipv6, and after parsing
proto, src and dst fields are converted to ipv4. When no
ver= field is specified, a ip version filter is implicitely
added and both protocols are parsed.
This change also gets rid of the fast compare types as the
filed might not be aligned correctly in the packet.
This also fixes the ifc= filter, as we have to check any
local address.
Based off the following 3 commits:
4a3fb87264f8bc03fc62f00ef335056f30d18023
45f8ba54143323f08a21343633764caa59aa3ea3
fdf6ef333705c844bcf3ccf2f93b2773f1a6aa41
Reading /mnt/acme/log reports a log of window create,
put, focus, and delete events, as they happen. It blocks
until the next event is available.
Example log output:
8 new /Users/rsc/foo.go
8 put /Users/rsc/foo.go
8 del /Users/rsc/foo.go
This lets acme-aware programs react to file writes, for example
compiling code, running a test, or updating an import block.
We used to just return the first address of the incoming
interface regardless of if the address matches the source
ip type and scope.
This change tries to find the best interface address that
will match the source ip so it can be used as a source
address when replying to the packet.
Flags can be runes. That means that we can't just
look at p[1] to decide if we have a named argument,
we need to look one rune forward. This change
does that.
The new command marks the target window as a scratch window -- a window
whose state cannot be "dirtied" by changes made to its body, therefore
avoiding warnings about unsaved changes when deleting the window or
exiting acme.
Existing examples of scratch windows are error, directory, and guide
windows, whose scratchness is set internally.
With the new command users and programs alike can create their own
scratch windows. This is put to use in acme's own win(1).
basically, we want the following commands to print
the same pid twice:
rc -c 'cat /dev/pid &;echo $apid'
vs:
rc -c 'a=1 cat /dev/pid &;echo $apid'
basically, Xsimple() calls exitnext() to determine if
a simple command should be promoted to exec, by peeking
ahead into the code and searching for Xexit instruction.
Xexit might not follow immediately after the Xsimple
instruction because of redirections, which exitnext()
would skip.
but it would not skip the Xunlocal instructions that
where added by the variable assignment.
the maketab helper program was generated in parallel, which
had a dependency to y.tab.h which lead to yacc running
twice in parallel.
this removes the dependency to y.tab.h in the virtual
maketab.$objtype target to prevent this race condition.
the dependency to y.tab.h is resolved in the main mk at the
$cputype.maketab target which serializes with the other
targets.
the page attribute table was initialized in mmuinit(), which is
too late for bootscreen(). So now we check for PAT support and
insert the write-combine entry early in cpuidentify().
this might have been the cause of some slow EFI framebuffers on
machines with overlapping or insufficient MTRR entries.
at the _cas0 label, the linker would generate spurious stack
adjustment before the return:
atexitdont+0x84 0x000000000003614c CLREX $0xf
atexitdont+0x88 0x0000000000036150 MOVW R31,R0
atexitdont+0x8c 0x0000000000036154 MOV (SP)16!,R30 <- ????????????
atexitdont+0x90 0x0000000000036158 RETURN
the work arround is to move the code into its own cas0
text symbol.
this fixes impossible cwfs crashes in srvi().