the history buffer that require knowledge of the readline internals to
make safe (it "knows" that GNU readline mallocs certain returned data,
and thus, with libedit, happily calls free on static variables).
using a #define to turn one into the other, this is pointless and causes
more portability issues than it solves (admittedly, in the year 1702 when
this code was written the opposite may have been the case).
before system header file inclusion magically causing what "read" is
#defined to to pick up a read-like prototype. For sanity's sake, put
prototypes for revolting trace_mr stuff in their own header file (instead
of nowhere at all and using the trick referenced above).
This allows the mouse to be used properly in consoles with different sizes:
before this change it was restricted to the size reported by the console
used to start the daemon.
Problem reported by Blair Sadewitz.
by our native bootloader.
- Restore lwp0.l_cpu (which is required for curcpu()) and
cpu_info_store.ci_curlwp after clearing BSS in case
a kernel is loaded by the firmware directly since these
values are in BSS and initilized before mach_init() is called.
(actually they are restored in mips_machdep.c:mips_vector_init()
but we use curcpu() earlier than that point)
Fixes silent hang right after boot on cobalt.
meesing with the TLB. That would usually show up as misterious kernel
crashes under heavy load.
Prettify the code while here so that traversal of the memory mapped
TLB arrays looks congruent in all functions.
Fixes PR 34706
Enable a few more bits in the I/O requested by ld and check for the fast
response bit when reading back from the queue.
Both changes come from reading the FreeBSD driver and testing on a Dell
CERC SATA controller.
vmspace information fails.
Return the nice value properly to userland via the /proc/<pid>/stat entry.
Use vm sizes from vmspace, rather than rusage structs, for the same
reasons as mentioned previously - see the comment in
kvm_proc.c::kvm_getproc2() about rusage values and zombie processes.
system has. This has the (scary-because-we've-been-running-so-long-
without-it) commit message (for the first version of the change):
Tell the controller how much physical memory we have. Without this
there was a chance that our DMA regions would collide with the
memory window used by the cache on the controller. The result would
be massive data corruption. This seemed to mainly affect systems with
>2GB of memory.
+ in /proc/<pid>/statm emulation, use the memory values from vmspace,
rather than struct rusage, since the rusage values appear to be 0 for
all processes except zombies. cf dsl's comment in
kvm_proc.c::kvm_getproc2()
+ in /proc/<pid>/stat, instead of returning the tv_sec value, return the
number of ticks we've had (roughly equivalent to the Linux jiffies).
Calculate these values from the tv_usec values.
Also:
+ enclose CPU_INFO_ITERATOR and CPU_INFO_FOREACH usage in #ifdef
MULTIPROCESSOR, at the request of Nick Hudson
Together, these changes allow htop to work on NetBSD.