Commit Graph

1073 Commits

Author SHA1 Message Date
christos
95e1ffb156 merge ktrace-lwp. 2005-12-11 12:16:03 +00:00
chs
8b17730eac put mcount.c in the normal object list, so that "make depend" works.
use a gcc attribute to prevent it from being instrumented.
2005-10-02 15:34:17 +00:00
uebayasi
e6760038b8 Redo previous; don't add mcount.po to POBJS when MKPROFILE=no. 2005-08-25 08:55:42 +00:00
uebayasi
bab482f18d Create mcount.po only when MKPROFILE != no. 2005-08-25 08:34:50 +00:00
christos
50f8955b6e 64 bit inode changes. 2005-08-19 02:04:03 +00:00
tron
72f9a2a842 Return correct error on all zero length codes. Fix from Gentoo bug 94584. 2005-08-04 14:36:42 +00:00
simonb
bdc552eaee KNF nit. 2005-07-27 12:41:09 +00:00
christos
773f5f5489 rearrange free's and add a missing one. 2005-07-14 02:36:49 +00:00
tron
b1be36cfb8 Don't use a static buffer in SHA1Transform() because it might cause
various problems including sporadic IPSec authentification failures
if this code is used by multiple instances in parallel.
2005-06-30 13:08:46 +00:00
junyoung
f465530831 Remove bcmp(). Use memcmp() instead. 2005-06-13 12:11:07 +00:00
junyoung
0ddaa77ca6 Oops, missed a semicolon. 2005-06-13 12:06:36 +00:00
junyoung
9bf0710d63 ANSI, De-__P(), and some cosmetic changes including
bcmp -> memcmp, bzero -> memset, bcopy -> memcpy.
2005-06-13 12:03:01 +00:00
scw
9931d6382c Re-sync with libc version of memcpy_arm.S, which has deals correctly
with big-endian ARM (non-XScale) systems.
2005-06-02 08:20:53 +00:00
christos
f69f7eea28 add missing const 2005-05-31 00:57:07 +00:00
jmc
6f594a3510 Provide HEXDIGITS as well (needed on mvme68k/stand) 2005-05-23 19:05:00 +00:00
christos
362a4a0bd5 Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
implement, xtoa(), but I think defining the samestring 50 times is a bit
too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...
2005-05-17 04:14:57 +00:00
reed
b8643619e6 Use ${TOOL_M4} instead of "m4". (I only tested this fix
for sparc but not sparc64 or alpha yet.)

Noticed problem when building NetBSD/sparc from a Linux/i386 host
that didn't have "m4".
2005-04-22 00:22:55 +00:00
dsl
0f5f503c2e Use std form for a multi-line comment 2005-04-09 13:04:35 +00:00
dsl
4f6d146592 KNF 2005-03-12 16:39:41 +00:00
perry
477853c351 nuke trailing whitespace 2005-02-26 22:58:54 +00:00
uwe
36ae53aba9 MBR_PTYPE_APPLE_UFS is now spelled with an underscore. 2004-11-12 19:34:43 +00:00
sekiya
77aa58c5b4 Use 64-bit-clean addition/subtraction opcodes for pointer arithmetic iff
_LP64 is defined.
2004-09-29 04:45:26 +00:00
enami
41122731c8 Redo part of rev. 1.10. 2004-09-17 21:54:28 +00:00
yamt
64308e90f3 arc4random: fix a bug introduced by rev.1.7.
actually generate four bytes random value, rather than
leaving a byte always zero.
2004-09-08 04:06:15 +00:00
christos
95bd3d33bf DECONST->UNCONST 2004-07-01 19:04:58 +00:00
christos
af06392139 DECONST -> UNCONST 2004-07-01 19:04:43 +00:00
christos
5d1f319c56 add __UNCONST 2004-07-01 19:04:14 +00:00
christos
75c2e1e75a Introduce a zerror() function that can be conditionally compiled out to
save space. share all error strings in a single array.
2004-06-30 15:44:55 +00:00
christos
9c5b11e7e9 cast help. 2004-06-30 14:00:02 +00:00
christos
b508e54615 constification fixes. 2004-06-30 13:59:22 +00:00
christos
84a3bc854d - multiple inclusion protection.
- constify some prototypes.
2004-06-30 13:59:05 +00:00
christos
049fd5eb10 help with casts, and lint hints. 2004-06-30 13:58:16 +00:00
christos
3e36df0496 avoid string const cast-aways. 2004-06-30 13:45:54 +00:00
christos
db25564166 remove useless typedef and casts 2004-06-30 13:45:21 +00:00
abs
3c2fbd8521 Add qsort to libsa (taken from sys/dev/vinum/vinumqsort.c) and use instead of
bubblesort in acorn32 bootloader. Reduces time to sort memory on A710 equipped
RiscPC from over twenty seconds to effectively instantaneous.
Update boot version to 3.30
2004-05-19 23:37:41 +00:00
yamt
f502110937 add '.L' prefixes to local labels. 2004-04-15 09:20:29 +00:00
drochner
ef369e0ed6 remove license clauses 3 and 4 from my cpoyright notices 2004-03-24 17:26:53 +00:00
drochner
ba017f8305 I was told I'm just an "author", not a "regent" 2004-03-24 16:21:06 +00:00
drochner
4281485619 remove license clauses 3 and 4 from my copyright notice 2004-03-24 16:03:06 +00:00
dsl
5101188f02 When searching for the superblock, check that the fs_sblockloc field
matches the location we read it from to ensure we don't have one of the
alternate superblocks.
Fixes part of PR kern/24809
2004-03-20 14:24:59 +00:00
keihan
b8702f530b netbsd.org -> NetBSD.org
This was the last commit of this kind to src/sys, which is now totally
"NetBSD.org clean".  Thanks for the patiance, and sorry for all the commits.
2003-12-04 13:57:30 +00:00
keihan
8476e6755a NetBSD.ORG -> NetBSD.org
Now all "NetBSD.ORG" are gone from src/sys.
2003-12-04 12:42:54 +00:00
uwe
b12f3576c6 Use assembler version of bswap64. 2003-11-14 00:39:17 +00:00
uwe
be72e49c47 bswap64 written in assembler. 2003-11-14 00:38:17 +00:00
uwe
8fdd163272 Eliminate bzero. 2003-11-13 23:55:20 +00:00
uwe
19d60bc09e Compile identity ntoh*/hton* only for big endian case. 2003-11-09 22:04:00 +00:00
scw
6bf28caf3e bzero is no longer used in the kernel. 2003-11-09 16:12:57 +00:00
martin
c9f72038da bzero is gone from the kernel 2003-11-09 11:25:18 +00:00
uwe
680e83de11 Get rid of bcopy relics. Minimize diffs against the libc version. 2003-11-09 01:03:56 +00:00
uwe
f28afa6ac5 Nuke bcopy. Move the code to memmove.S (which it is) make memmove the
primary entry point and comment out the bcopy entry point.

Kernels before and after the change are identical.
2003-11-08 23:59:12 +00:00
lukem
7ce35daccc Add '.SUFFIXES: .m4' here, now that <sys.mk> doesn't provide it anymore.
It appears that .PATH.m4:  needs it.
Should fix problem noted in private mail by Markus W Kilbinger.
2003-11-08 14:45:02 +00:00
jdolecek
3050a50d90 don't need bcmp() and bzero() 2003-11-08 07:40:37 +00:00
jdolecek
7cc19c4f27 no need for bcmp.c 2003-11-08 07:24:46 +00:00
dsl
7dbd0e094b Make 'dependall' generate dependencies in these libraries. 2003-11-07 23:34:28 +00:00
junyoung
dfb82ca484 rindex() shouldn't be used in the kernel. Use strrchr() instead. 2003-11-05 05:46:32 +00:00
jdolecek
c12a055f27 g/c index.c and rindex.c (not used anywhere) 2003-11-01 13:17:01 +00:00
he
202ba2bdcf Add a prototype for memset(). 2003-10-30 22:15:28 +00:00
mycroft
ab8cc2146b Don't try to build random.S on 68010. 2003-10-29 23:32:15 +00:00
mycroft
363f05d417 Refresh from libc to get 68010 version. 2003-10-29 23:19:11 +00:00
junyoung
592280de7a index() shouldn't be used in the kernel. Use strchr() instead. 2003-10-27 07:28:15 +00:00
junyoung
21110867b5 Goodbye to bcmp.S, bcopy.S, and bzero.S. They are defined as macros in
sys/systm.h.
2003-10-26 14:39:35 +00:00
junyoung
6fe2633df0 Remove bcmp.S and bzero.S from list. They were doing nothing but wasting
kernel bits for a long time (2 years?).
2003-10-26 14:37:52 +00:00
scw
2ffebceb85 Duh, fix the align-to-32-bits code. 2003-10-23 20:46:40 +00:00
he
91d100ed41 The paddr_t type is integral, so no longer compatible with NULL,
so use 0 instead.
2003-10-23 15:06:26 +00:00
tsutsui
fa49899d30 Add bswap64.c, required by options FFS_EI. 2003-10-21 14:49:00 +00:00
itohy
faf6cfae4c Rename local variables read' to nread' to shut up -Wshadow. 2003-10-18 06:39:12 +00:00
scw
5e7e19ec12 Xscale-optimised mem* functions, contributed by Wasabi Systems.
(Note: memcmp/memset improvements also benefit non-Xscale).

memcmp()  - Compare 32-bits at a time if possible. Special-case 6-byte
            comparisons, for the benefit of the network stack.

memset()  - More loop unrolling, plus use of 'strd' instruction,
            results in > 100% speedup on Xscale.

memcpy()  - Big-endian support, unrolled loops, 'strd/ldrd/pld', plus
            special-cases for very common length/alignment combinations
            (at least in the kernel). Benchmarks show ~50% improvment on
            Xscale.

memmove() - Big-endian support. Use fast memcpy(), above, if the regions
            don't overlap. Otherwise unchanged.
2003-10-13 19:59:24 +00:00
chs
06332c88ef update for new gas syntax. from Jochen Kunz. 2003-10-10 15:07:43 +00:00
ichiro
266021fa1e big endian support
thanks to smi@sm.sony.co.jp
2003-10-09 08:54:54 +00:00
lukem
1ea85577bc sort entries, and add a couple 2003-10-08 04:13:13 +00:00
itojun
cc76a8982b fix build for bootloaders (no /usr/include/sys/kernel.h any more). 2003-10-02 10:39:27 +00:00
martin
1f68fd5144 Same treatment as libc/hash/sha1.c: ifdef the sparc64 compiler bug
workaround for old gcc only.
2003-09-23 20:00:43 +00:00
chs
0454ead77f the asm version of strlcpy() was buggy, just use the C version. 2003-09-11 05:04:33 +00:00
he
9ac0a9ed26 Um, undo last; libsa printf doesn't do %z. 2003-09-04 12:02:10 +00:00
he
bd42895755 Use the %zu format for size_t printing instead of cast + %lu. 2003-09-04 11:42:52 +00:00
he
022f01cef7 Cast size_t to u_long before printing, and use %lu instead of %d as format.
Fixes compilation on alpha.
2003-09-03 12:43:41 +00:00
dsl
fafabf93cc Another attempt to get libsa to contain the right things.
- put a 'standards conforming' memcmp into memcmp.c
- make bcmp be a second label on the same code
- make bcmp.c be just #include "memcmp.c"
This means that libsa.o might contain both a memcmp.o and a bcmp.o, but
both contain the same code (defining both symbols) so it doesn't matter
which ld uses.
Saves worrying about which of bcmp.c and memcmp.c the architecture specific
Makefile requests.
2003-09-01 12:28:03 +00:00
fvdl
60ae17c7ae Fix signed/unsigned warnings. 2003-08-31 22:40:13 +00:00
chs
6e0aaa640d update for LWPs, and some lite cleanup. 2003-08-31 01:52:43 +00:00
dsl
22588a3d36 The __strong_alias() seems to have to be in the file with the definition.
So make bcmp.c define bcmp and memcmp.
This should (?) fix the atari build.
(I've now no idea why the previous change defined memcpy for the alpha build.)
2003-08-29 19:53:18 +00:00
dsl
904ed3bb04 An ever sneakier way of making memcmp and bcmp use the same code:
__strong_alias(memcmp,bcmp)
2003-08-27 22:53:18 +00:00
dsl
d0db314661 Use memset not bzero to help shrink alpha bootxx_lfs
(sys/arch/alpha/stand/common/start.S also uses bzero, I don't know
any alpha opcodes so cant change that one...)
2003-08-27 22:42:08 +00:00
matt
4a33fdce54 Actually the right instruction to fill a half-word.
From Juergen Hannken-Illjes hannken at eis dot cs dot tu-bs dot de
2003-08-27 17:37:43 +00:00
dsl
db4706faf9 Reduce memory footprint:
- use file buffer for all block reads
- only save a small amount of the indirect block list
Allows i386 bootxx_ufs code to load /boot from a filesystem with 32k blocks
while still fitting inside 64k of memory.
Code size reduced as well (by ~1k on i386).
It ought to be possible to use a buffer that is smaller than a filesystem
block.  This might be needed in order to boot from filesystems with larger
block sizes.
2003-08-22 21:33:52 +00:00
elric
72e3ec4b0c Should call ufs_close() if it isn't being built in. 2003-08-21 00:01:28 +00:00
elric
2a56d40c5c make 'path' argument to cd9660_open 'const char *' and fix the fallout. 2003-08-21 00:00:52 +00:00
itojun
1403d9d920 KNF 2003-08-20 13:32:33 +00:00
ragge
a9e5513c6b Kerner library files for pdp10. 2003-08-19 10:59:26 +00:00
dsl
8453fb0040 make 'path' argument to ufs_open 'const char *' and fix the fallout. 2003-08-18 15:45:27 +00:00
dsl
d678060c05 KNF, fix a comment or two 2003-08-18 08:00:52 +00:00
ragge
bc830a1980 Do not use the builtins for the mem* functions on vax, the compiler gets
confused with the static inline functions vax uses.
2003-08-13 11:34:24 +00:00
ragge
f69577d50c Include the C versions of the string instructions.
Replace blkcpy() with a version that can handle overlapping data areas.
2003-08-13 11:32:23 +00:00
matt
f70606090a Add a memset.S (does not use dcbz; to be added later). It does both bzero
and memset.
2003-08-10 21:17:08 +00:00
martin
785cae7ed0 Sync with userland version. 2003-08-10 14:20:03 +00:00
agc
aad01611e7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
2003-08-07 16:26:28 +00:00
scw
5d91e08442 In lookup(), don't free "dir" on exit if we found a matching entry.
Otherwise the caller ends up with a pointer to free'd memory...
2003-07-15 13:27:07 +00:00
dsl
f92748a3e8 Add xlat_mbr_fstype - converts mbr type to disklabel type 2003-07-07 13:20:17 +00:00
martin
34718fb25a Protect opt_*.h include by _KERNEL_OPT 2003-06-23 14:17:24 +00:00
martin
d505b18964 Make sure to include opt_foo.h if a defflag option FOO is used. 2003-06-23 11:00:59 +00:00
briggs
b2566d8735 Provide a strtoul() implementation based on the one in libc instead of the
totally different version that was here.  This version, of course, has an
BSD license on it while the old one did not.  This one also compiles down
to tighter code--the smaller the better for libkern & libsa.
2003-06-07 02:52:33 +00:00