atto(1): Initial import of tiny text editor, as discussed on
tech-userlevel@.
This is Hugh Barney's atto text editor modified for inclusion in
NetBSD. Since the upstream repository is inactive and the original
author wishes to keep the code base below 2000 lines of C, this is
effectively a fork that lives in usr.bin/atto. It serves as an
alternative to vi(1) for users more accustomed to modeless text
editors.
Notable changes include reworked keyboard input code to handle a wider
range of terminals (via libcurses cursor key translation), more useful
help for unrecognized key presses, and standardized option handling
using getopt (with syntax highlighting disabled by default).
Thanks martin and other folks for feedback and testing.
ATTO(1) General Commands Manual ATTO(1)
[115 lines not shown]
Additionally pull up following revision(s) (requested by riastradh in ticket #1380):
lib/libc/gen/pthread_atfork.c: revision 1.20
Specify MAP_ANON, the default (MAP_FILE) with a fd == -1 makes no sense.
Introduce debug function print_winregs() and clear_winregs().
These debug functions can be used to print out snapshots of the register
window.
The SAVE_WINREGS() macro in locore.s creates the snapshot.
Pull up following revision(s) (requested by yurix in ticket #561):
sys/arch/arm/ti/am3_prcm.c: revision 1.15
am335x: fix timer clock offset
Closes PR 60910
Fix by Elias Howell.
Pull up following revision(s) (requested by joe in ticket #1405):
sys/dev/pci/if_vmx.c: revision 1.19
fix wrong range from computing the MIN of tx and rx queues.
Pull up following revision(s) (requested by joe in ticket #560):
sys/dev/pci/if_vmx.c: revision 1.19
fix wrong range from computing the MIN of tx and rx queues.
Pull up following revision(s) (requested by rin in ticket #1402):
sys/arch/alpha/alpha/vm_machdep.c: revision 1.124
sys/arch/alpha/alpha/machdep.c: revision 1.386
alpha: Align kernel stack pointer to 16-byte boundaries
as ABI requires. With this fix, full ATF run successfully completed
without any regression.
PR port-alpha/60865 NetBSD-current/alpha panics running getcwd test
OK thorpej@
Pull up following revision(s) (requested by rin in ticket #557):
sys/arch/alpha/alpha/vm_machdep.c: revision 1.124
sys/arch/alpha/alpha/machdep.c: revision 1.386
alpha: Align kernel stack pointer to 16-byte boundaries
as ABI requires. With this fix, full ATF run successfully completed
without any regression.
PR port-alpha/60865 NetBSD-current/alpha panics running getcwd test
OK thorpej@
Pull up following revision(s) (requested by riastradh in ticket #1401):
libexec/ld.elf_so/expand.c: revision 1.8
libexec/ld.elf_so/paths.c: revision 1.43
lib/libc/misc/stack_protector.c: revision 1.10
lib/libc/include/__sysctl.h: revision 1.1
ld.elf_so: Use __sysctl() syscall stub rather than sysctl() wrapper.
This avoids pulling in some unnecessary junk from libc, saving on a
couple kilobytes of space and some relative relocations at runtime.
PR lib/59387: ld.elf_so: needlessly includes libc/gen/sysctl.c user.*
Pull up following revision(s) (requested by riastradh in ticket #554):
sys/kern/vfs_vnode.c: revision 1.159
vdrain: Recompute target after each iteration.
This way if sysctl -w kern.maxvnodes=N fails, the vdrain task doesn't
perpetually keep trying to attain the unattainable.
Doesn't fix everything about racy access to desiredvnodes, but it
should help with the major symptom.
PR kern/60603: Sisyphean vdrain task
Pull up following revision(s) (requested by riastradh in ticket #1400):
sys/arch/sparc/sparc/machdep.c: revision 1.342
sparc: Load the signal handler _before_ resetting it, not after.
Should fix SA_RESETHAND.
PR port-sparc/59323: t_sigaction:sigaction_resethand test is failing
Pull up following revision(s) (requested by riastradh in ticket #1399):
sys/kern/sys_futex.c: revision 1.26
futex(2): Avoid returning early on timeout.
Rounding in the arithmetic leading into cv_timedwait_sig, and any
skew between the timecounter used by clock_gettime and the hardclock
timer used to wake cv_timedwait_sig, can lead cv_timedwait_sig to
wake up before the deadline as observable by clock_gettime.
futex(FUTEX_WAIT) is not supposed to do that, so ignore when
cv_timedwait_sig returns EWOULDBLOCK -- we'll notice the deadline has
passed in the next iteration anyway, if it has actually passed.
While here, make sure that we never pass less than 1 tick to
cv_timedwait_sig -- that turns it into cv_wait_sig, to wait
indefinitely with no timeout.
With this change, I have not seen any failures as reported in:
[8 lines not shown]
Pull up following revision(s) (requested by riastradh in ticket #1398):
sys/kern/sys_futex.c: revision 1.23
sys/kern/sys_futex.c: revision 1.24
sys/kern/sys_futex.c: revision 1.25
tests/lib/libc/sys/t_futex_ops.c: revision 1.11
tests/lib/libc/sys/t_futex_ops.c: revision 1.12
tests/lib/libc/sys/t_futex_ops.c: revision 1.13
tests/lib/libc/sys/t_futex_ops.c: revision 1.14
sys/sys/futex.h: revision 1.6
sys/sys/futex.h: revision 1.7
sys/futex.h: Nix trailing whitespace.
No functional change intended.
t_futex_ops: Spruce up diagnostics.
- Use RL to report errno for any syscalls that set it.
[45 lines not shown]
Pull up following revision(s) (requested by riastradh in ticket #1397):
sys/uvm/uvm_map.c: revision 1.432
sys/sys/proc.h: revision 1.374
sys/kern/kern_proc.c: revision 1.284
sys/kern/kern_proc.c: revision 1.285
sys/kern/kern_proc.c: revision 1.286
(all via patch)
kern: New function proc_find_reflocked.
This is like proc_find_locked but returns with p_reflock held rather
than p_lock. Will be used to replace proc_find_locked in order to
fix:
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
No modules currently use proc_find_locked or proc_find_reflocked, so
[32 lines not shown]
Pull up following revision(s) (requested by riastradh in ticket #553):
sys/uvm/uvm_map.c: revision 1.432
sys/sys/proc.h: revision 1.374
sys/kern/kern_proc.c: revision 1.284
sys/kern/kern_proc.c: revision 1.285
sys/kern/kern_proc.c: revision 1.286
kern: New function proc_find_reflocked.
This is like proc_find_locked but returns with p_reflock held rather
than p_lock. Will be used to replace proc_find_locked in order to
fix:
PR kern/60568: panic locking against myself (p->p_lock) in NFS from
sysctl_vmproc
No modules currently use proc_find_locked or proc_find_reflocked, so
there should be no module ABI compatibility issues here.
[31 lines not shown]