resolution profiling on Pentiums. On a 100MHz Pentium, the resolution
is at best 10 ns and actually a few hundred ns, but units of 10's or
100's of ns would be inconvenient and the current units of 1 us are a
bit too coarse.
released until the file system was unmounted. This bug also affected
kern/vfs_syscalls.c but was fixed in rev.1.18 and rev.1.20 there.
Reviewed by: davidg
any statclock ticks. Pretend that all the time up to the first
statclock tick is system time. . This makes a difference mainly for
benchmarks that test short-lived processes - the user and system
times for processes that each lived for about 1ms only added up to
about 10% of the real time even when there was very little interrupt
activity.
Break the printing of a quad_t variable correctly.
alias `pcb_cr3' instead. That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
altfmt was abused to sometimes screw up the disassembly of the bytes
following unconditional jump instructions. Gas doesn't pad to a longword
boundary like the comment said - that is the programmer's responsibility.
wdp_fixedcyl) gives it directly. wdp_removedcyl is "reserved" except
in ancient ATA-1 drafts and shouldn't be added. This fixes PR 1288.
Changed some fields and comments in struct wdparams to match a less-
ancient ATA draft.
Fixed bit number for `rdy' in status string.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these. I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized. Now it is only used for one struct
copy in si.c.
gcc only inlines memcpy()'s whose count is constant and didn't inline
these. I want memcpy() in the kernel go away so that it's obvious that
it doesn't need to be optimized. Now it is only used for one struct
copy in si.c.
queue in vm_fault.
Move the PG_BUSY in vm_fault to the correct place.
Remove redundant/unnecessary code in pmap.c.
Properly block on rundown of page table pages, if they are busy.
I think that the VM system is in pretty good shape now, and the following
individuals (among others, in no particular order) have helped with this
recent bunch of bugs, thanks! If I left anyone out, I apologize!
Stephen McKay, Stephen Hocking, Eric J. Chet, Dan O'Brien, James Raynard,
Marc Fournier.
name string. This function should be rewritten to deal with more than
10 units of a given type.
Pointed out by: jmf@free-gate.com (Jean-Marc Frailong)
(I fixed it slightly differently)
name (ie; strip off the domain). Given a hostname 'fooey.bar.com', the
previous code returned a system name of 'fooey.ba', instead of the more
correct 'fooey'. SCO uses 'uname' for many things, including some of
it's socket code so this patch is necessary for running certain legacy
SCO apps. :)
A variant of this code has been running on my box for 2 months now.
need this.
Consider the following code:
case 'O':
output_filename = malloc(strlen(arg)+4);
strcpy(output_filename, arg);
strcat(output_filename, ".tmp");
real_output_filename = arg;
return;
The idea here is to malloc() a buffer big enough to hold the name of
a supplied file name, plus ".tmp". So we malloc() 'size of filename'
bytes plus 4, right? Wrong! ".tmp" is _FIVE_ bytes long! There's a
traling '\0' which strcat() gleefully tacks on _outside_ the bounds
of the buffer. Result: program corrupts own memory. Program SEGVs at
seemingly random times. Bill not like random SEGVs. Bill smash.
Know how I found this? I've been trying to bootstrap -current on my
2.1.0-RELEASE machine at work and I couldn't seem to get libc.a built
because the linker would intermittently blow chunks while executing
things like 'ld -O foo.o -X -r foo.o'. Since this is an initial
bootstrap version of ld, it was linked against the 2.1.0 libc, who's
malloc() behaves differently than that in -current.
Presumeably ld -O doesn't blow up in -current, otherwise someone would
have spotted this already. I don't know if this is a bug or a feature.
Anyway. I'm changing the strlen(arg)+4 to strlen(arg)+5. Bah.