dsl
2bb9a33a0f
Add a strchr() - for dosfs in particular.
...
The i386 asm version in src/common is rather larger than this one.
2008-03-14 22:27:32 +00:00
dsl
2694fcbd4b
Add a local strcasecmp() instead of pulling the bloat from libkern.
2008-03-14 22:21:53 +00:00
tsutsui
5d07958fe3
Fix typo in comment.
2008-02-25 15:33:20 +00:00
matt
c2b9622034
Don't need to that particular in mtprng_random(). Use 2 values instead of 8.
2008-02-17 22:49:11 +00:00
matt
ab1d549cb1
Improve my version of mtprng_random. Reshuffle things. Add an compatible
...
version of init_by_array.
2008-02-02 01:13:04 +00:00
simonb
e99e83279b
Check _STANDALONE as well as _KERNEL when choosing headers to include.
...
Also pull in <lib/libkern/libkern.h> so we get prototypes and a struct
mtprng_state declaration.
2008-01-31 08:23:13 +00:00
simonb
4cbecce6c5
Have mtprng_random() call mtprng_rawrandom() to get more
...
random data instead of calling itself. Much nicer to the
stack...
2008-01-31 03:37:13 +00:00
simonb
ba30aadce1
Check against correct constant in a KASSERT().
2008-01-31 03:34:04 +00:00
matt
3056c4f69a
Add Mersenne Twister prototypes and state struct to libkern.h
...
Cleanup a comment. s/RLEN/MTPRNG_RLEN/g s/POS1/MTPRNG_POS1/g
Remove unneeded test code.
2008-01-31 02:36:09 +00:00
matt
cd27642585
Add Mersenne Twister PRNG implementation. This is a new implementation.
2008-01-31 02:09:54 +00:00
simonb
d8de5b102b
Remove support for NetBSD/pc532.
2008-01-09 11:25:58 +00:00
ad
4a780c9ae2
Merge vmlocking2 to head.
2008-01-02 11:48:20 +00:00
tsutsui
e5434d17a5
ANSIfy.
2007-12-29 17:54:41 +00:00
tsutsui
c3a9c74a16
ANSIfy and some KNF.
2007-12-29 16:54:49 +00:00
jmcneill
e38d794d0c
libkern bits for usermode port.
2007-12-29 14:39:33 +00:00
perry
b6a2ef7569
Convert many of the uses of __attribute__ to equivalent
...
__packed, __unused and __dead macros from cdefs.h
2007-12-25 18:33:32 +00:00
perry
970ad9314d
Remove __attribute__((__noreturn__)) from things already marked __dead
...
Found by the department of redundancy department.
2007-12-24 15:46:45 +00:00
joerg
45f2572a92
Add virtual i8254 for x86emu.
2007-12-21 17:45:50 +00:00
joerg
151d068190
Add glue for x86emu and build it as part of i386/ALL.
2007-12-13 17:25:19 +00:00
tsutsui
2dc9b9cb28
ufs_ls.c doesn't belong to lfs.
2007-12-08 16:00:25 +00:00
isaki
48e1704028
Use standard error code (EIO) instead of standalone error code
...
(ESHORT). Because loadfile_*() is used with or without
_STANDALONE, therefore, don't use error code in "saerrno.h".
Pointed out by and discussed with he@.
2007-12-03 09:51:30 +00:00
tsutsui
0a953ce07e
- also pass correct size on dealloc() of in-memory superblock data
...
- also call dealloc() for group descriptor blocks
2007-12-02 06:47:43 +00:00
tsutsui
8d7676534f
Allocate correct size for in-memory data struct m_ext2fs
...
(which is larger than SBSIZE).
2007-12-02 06:12:35 +00:00
tsutsui
48db0a5603
- fix description about index structure of an inode to match ext2fs_dinode
...
- put more byteswap ops on reading block numbers in indirect blocks
(XXX: untested on big endian machines)
2007-12-02 05:23:40 +00:00
tsutsui
db898c555a
unsigned -> unsigned int
2007-12-02 04:59:24 +00:00
tsutsui
d8fc666005
- build ext2fs.c
...
- put SRCS per each file system.
2007-12-01 18:11:02 +00:00
tsutsui
28712e0756
Add ext2fs support for libsa.
...
Mostly based on ufs.c, and some ext2fs specific stuff is pulled from
sys/ufs/ext2fs/ext2fs_bswap.c and sys/ufs/ext2fs/ext2fs_vfsops.c.
XXX1: Should we share ufs.c with #ifdef LIBSA_EXT2FS as ffs and lfs do?
XXX2: Maybe we should share ext2fs_bswap.c with kernel.
2007-12-01 18:06:22 +00:00
tsutsui
c3af9178e9
Use "uint" rather than "unsigned" without a type.
2007-12-01 17:44:16 +00:00
isaki
1c038e6834
style, indent, and ANSI-fy.
2007-11-24 13:20:53 +00:00
isaki
33469b0e28
loadfile_*() must set errno when it returns -1.
2007-11-23 04:32:14 +00:00
plunky
b83f9a6a6d
remove insque/remque from libkern, they are no longer used
2007-11-22 22:56:16 +00:00
matt
1d4dffbc51
Make rb_tree_insert_node return true/false whether the node was inserted
...
or not.
2007-11-21 16:42:51 +00:00
yamt
c77d808475
build rb.c.
2007-11-20 13:49:01 +00:00
yamt
3acf687ede
rename
...
RB_LEFT
RB_RIGHT
RB_OTHER
to
RB_DIR_LEFT
RB_DIR_RIGHT
RB_DIR_OTHER
so that it can coexist with sys/tree.h.
2007-11-20 12:32:55 +00:00
yamt
636f153f4d
fix compilation in the case of _KERNEL && DIAGNOSTIC && !RBDEBUG.
2007-11-20 08:30:05 +00:00
isaki
3a7a8e72de
x68k's floppy is 8*2 sect/cyl, not 18*2 sect/cyl.
2007-11-11 13:23:07 +00:00
tsutsui
fe9146d494
Add an extern decl of try_bootp variable here since MD sources could set it.
2007-10-27 12:21:17 +00:00
tsutsui
03f68714d2
Include "bootp.h" for a function declaration of bootp().
2007-10-27 12:19:41 +00:00
martin
db90818494
Make a few debug outputs only happen when debugging.
2007-10-01 13:15:06 +00:00
martin
aa444a36a0
When compiled with COMPAT_SOLARIS_UFS, always calculate fs_qbmask and
...
fs_qfmask on the fly. This allows libsa to read newer Solaris ufs
filesystems (which have a slightly incompatible superblock).
Suggested by Antti Kantee when discussing PR kern/37000.
2007-09-29 21:36:56 +00:00
pooka
018bb97124
Rename __assert() to __kernassert() so that it doesn't collide
...
with the libc version. They take different arguments.
2007-09-24 14:19:03 +00:00
ad
7dcf597b04
Do the panicstr check only if _KERNEL.
2007-08-03 13:06:00 +00:00
ad
480f8d26c5
Disable kernel assertions if panicstr != NULL.
2007-07-29 11:46:02 +00:00
dsl
cb40f24fa8
include sys/cdefs.h
2007-07-19 22:00:04 +00:00
isaki
b9c5a4c699
Remove _ZLIB_PRIVATE that should have been removed 10 years ago.
2007-06-23 10:50:24 +00:00
ad
3f8edbdfd7
G/C dead code.
2007-06-10 00:52:29 +00:00
martin
cf9773f5c0
It is "data_start" not "data" - pointed out by Tom Spindler
2007-06-06 07:56:39 +00:00
martin
933b671bfa
Add a MARK_DATA marker containing the effective VA of the first loaded
...
data segment.
2007-06-05 08:48:49 +00:00
matt
75f8d3f9a5
Include byte_swap_[24].c for kernels compiled with -O0
2007-04-13 22:12:04 +00:00
matt
e3a731cab5
Enable builtin_ffs for vax
2007-04-09 17:39:37 +00:00
scw
5764a76889
Remove support for NetBSD/{,evb}sh5.
2007-04-08 09:35:21 +00:00
uwe
eaa25d5966
Provide __movmemSI12_i4 (gcc4) a.k.a. __movstrSI12_i4 (gcc3) that gcc
...
emits for sh4 to copy 12 bytes at certain optimization levels.
Discovered by compiling landisk kernel with -Os.
Use gcc3 naming ("movstr") to match the rest of the "movstr" files.
2007-03-14 22:22:53 +00:00
he
fdcc1ff67a
We need char* for pointer arithmetic.
2007-03-05 14:49:04 +00:00
christos
53524e44ef
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
2007-03-04 05:59:00 +00:00
uwe
e918be7b93
Add missing newlines to debug messages.
2007-02-25 04:46:32 +00:00
thorpej
712239e366
Replace the Mach-derived boolean_t type with the C99 bool type. A
...
future commit will replace use of TRUE and FALSE with true and false.
2007-02-21 22:59:35 +00:00
ragge
ad9091c30f
Repair copyright that has been broken since -94.
...
Gently requested by Otto Moerbeek.
2007-01-14 13:26:18 +00:00
yamt
ce9d4b0004
remove nqnfs from comments. from Arnaud Lacombe.
...
(no functional changes.)
2006-12-29 13:05:48 +00:00
chs
088fbfd7aa
in fdloadfile(), fail if we can't read the entire exec header.
2006-12-09 22:11:36 +00:00
dogcow
437f8cc149
make bootxx_msdos fit in 8k again; thanks, __internal_memset_, for spilling
...
registers all over the place.
2006-12-02 00:38:22 +00:00
dyoung
e3361bb265
Add strsep(3) to libkern.
...
To avoid code duplication, move strsep.c to the kernel/userland
common files.
Soon I will commit source-address selection (options IPSELSRC).
It will use strsep(3).
2006-11-13 03:26:43 +00:00
christos
9573aa20e8
- call the initialization routine for arc4randbytes.
...
- knf (add continues)
2006-11-05 14:13:56 +00:00
christos
31a62606ea
Merge kernel and userland rmd160 and sha2 implementation.
...
XXX: We still install rmd160.h and sha2.h in /usr/include/crypto, unlike
the other hash functions which get installed in /usr/include for compatibility.
2006-10-27 21:20:48 +00:00
thorpej
82fd1ebbaa
- Move strtoll.c and strtoull.c from libc/stdlib to common/libc/stdlib.
...
- Add strtoll.c and strtoull.c to libkern.
2006-10-08 03:14:55 +00:00
simonb
a4c94c5ab7
Remove stale copy. Pointed out by uwe@ ages ago.
2006-09-28 13:12:59 +00:00
matt
efc67dee86
Add a way for a user to know what nodes have changed when a node has been
...
inserted or removed. Refactor node insertion to not require rebalancing
all the time or a loop if it does. In rb_tree_swap_prune_and_rebalance,
don't call rb_tree_reparent_nodes, instead do the work ourselves (since
we will eventually undo half of the work of rb_tree_reparent_nodes).
2006-09-10 23:57:31 +00:00
matt
9bed3293b9
If __STDC__ and GNU C >= 3.0, define C99's bool, true, false
2006-09-10 23:49:21 +00:00
matt
d9bb545dc5
Shrink rb_tree to 4 pointers (2 if RBSMALL is defined). Move compare
...
functions to a separate rb_tree_ops structure. Make every int explicit
in being signed or unsigned. Use RBDEBUG to enable debug code. Move
rbt_count to RBSTATS. Use RBSMALL to not keep track of min/max.
2006-09-09 06:52:18 +00:00
matt
75de26ab17
Add rb_tree_find_node_{geq,leq}. Add stats. Make TAILQ DEBUG only.
...
Keep track of tree's min/max nodes for easier iteration. Improve comments.
Move functions around to improve locality.
2006-09-09 05:55:51 +00:00
matt
958730091e
Fix and simplify node removal. Add lots of assertions and comments.
2006-09-08 04:07:15 +00:00
thorpej
f68bacf5a3
Use static at the function decl if the prototype also uses static.
2006-09-06 20:01:57 +00:00
scw
24f4ed9338
The list of registers which sdivsi3 can clobber has changed in gcc4.
...
Make the necessary changes.
2006-09-05 22:07:08 +00:00
matt
3aa5e506b7
Rewrite of red-black tree code.
2006-09-05 04:35:45 +00:00
scw
456695f0eb
The kernel is built with "-mdiv=call", so add a __sdivsi3_1 alias
...
for __sdivsi3.
2006-09-04 20:44:48 +00:00
matt
497415f67e
Make this compile in _KERNEL || _STANDALONE. Make gcc4 happy.
2006-09-02 20:46:50 +00:00
dyoung
8cd106d3d2
Per discussion on tech-kern and tech-userlevel, move the bit-twiddling
...
macros, __BIT, __BITS, SHIFTIN, SHIFTOUT, and __arraycount() from
lib/libkern/libkern.h to sys/cdefs.h. Add a __-prefix to SHIFTIN
and SHIFTOUT, and add a manual page for the bit-twiddling macros,
bits(3).
Make the __BIT and __BITS macros "widthless," as best I can, by
changing their type to uintmax_t from uint32_t. XXX The manual
page lags this change by a bit.
Define __PRIxBIT and __PRIxBITS printf(3) format strings.
2006-08-31 19:24:37 +00:00
tsutsui
a3bdccd23a
Add src/common/include to include header search path so that
...
standalone programs can be built without installed ${DESTDIR} tree.
Okayed by christos, and should close PR 33431.
2006-08-28 13:34:18 +00:00
matt
5e87012f78
Add __NULL_STMT which is do { } while (/* CONSTCOND */ 0)
2006-08-25 19:07:44 +00:00
rillig
b102417f76
Fixed the gcc warning that "static" should come before "const".
2006-07-16 06:06:20 +00:00
matt
53ea8158b4
With VAX & GCC4, use builtin memset and memmove.
2006-07-08 00:24:26 +00:00
kardel
de4337ab21
merge FreeBSD timecounters from branch simonb-timecounters
...
- struct timeval time is gone
time.tv_sec -> time_second
- struct timeval mono_time is gone
mono_time.tv_sec -> time_uptime
- access to time via
{get,}{micro,nano,bin}time()
get* versions are fast but less precise
- support NTP nanokernel implementation (NTP API 4)
- further reading:
Timecounter Paper: http://phk.freebsd.dk/pubs/timecounter.pdf
NTP Nanokernel: http://www.eecis.udel.edu/~mills/ntp/html/kern.html
2006-06-07 22:33:33 +00:00
uwe
497c1ccc27
Provide __movmem* aliases to __movstr* functions.
...
Gcc4 uses movmem, older versions use movstr.
2006-05-22 21:34:08 +00:00
uwe
9001bc2fd8
G/c #ifdef PIC we inherited from the userland.
2006-05-22 20:56:44 +00:00
mrg
696ab05f50
add (char *) cast to quieten GCC.
2006-05-20 19:40:46 +00:00
mrg
abeaa4f60d
apply -Wno-pointer-sign with GCC4.
2006-05-12 03:29:11 +00:00
mrg
22406ced78
ssize_t -> size_t to match variable and functions.
2006-05-11 01:13:44 +00:00
thorpej
b69c14413b
Support for building proplib in the kernel.
2006-04-27 20:43:09 +00:00
uwe
e983955bb3
libc gets gcc millicode from libgcc, so we don't need to keep it
...
in src/common. Move it to sys/lib/libkern/arch/sh3.
2006-04-22 22:48:53 +00:00
thorpej
7d3d66c90e
Move strtoumax.c from libc/stdlib to common/libc/stdlib and include it
...
in libkern. Required for new code coming soon.
2006-04-22 15:33:33 +00:00
christos
c76b868cf4
Imply DIAGNOSTIC if __COVERITY__.
2006-04-15 01:09:34 +00:00
christos
147a6ae8fb
If __COVERITY__ is defined, turn on KASSERT and _DIAGASSERT.
2006-04-14 18:24:56 +00:00
nonaka
5918a2e057
Always _LOCORE is defined for standalone program.
2006-04-14 09:23:01 +00:00
cherry
39ba8074f1
Fixed CVS version headers
2006-04-07 14:27:33 +00:00
cherry
ba7cbe760f
Initial import of arch/ia64 sources.
...
These sources are ported from FreeBSD/ia64 code.
See individual source files for credits.
In addition, code from NetBSD/alpha NetBSD/sparc64,
NetBSD/i386 and NetBSD/amd64 were used as templates,
along with my own additions.
2006-04-07 13:57:43 +00:00
cherry
c988ba8700
Pass by reference to MD_LOADSEG(). Thanks to Matt Thomas for pointing this out.
2006-04-06 09:25:58 +00:00
cherry
3627104dbe
Encapsulated the MD test: phdr[i].p_type & PT_LOPROC out of MI code,
...
and into MD_LOADSEG() as suggested by Christos.
2006-04-03 15:45:36 +00:00
cherry
50756fb219
Allows processor ABI specific ELF segment loads.
...
If the macro MD_LOADSEG defined in
machine/loadfile_machdep.h evaluates to 1, the machine
specific segment is loaded.
See: http://mail-index.netbsd.org/tech-kern/2005/12/30/0003.html
2006-04-03 14:08:41 +00:00
tsutsui
b3e724899c
Remove unused file. Pointed out by uwe.
2006-03-30 13:44:51 +00:00
martin
972ca1ead8
Remove an unused, obsolete copy (pointed out by Valeriy E. Ushakov).
2006-03-30 08:07:47 +00:00
uwe
4dff387338
G/c this stale copy of SYS.h. It has not been updated since 1999. It
...
has not been used since an unused copy of setjmp.S has been removed
from here in 2002 (i386 removed its own in 1999).
2006-03-30 02:13:10 +00:00
dyoung
321a3122bb
Per discussion on source-changes@, add __arraycount(array) for
...
counting the number of elements in a static array, using the idiom,
sizeof(array)/sizeof(array[0]).
XXX This may move in the future, but this is a safe place to put
XXX it for use in the kernel.
2006-03-27 21:18:33 +00:00
kleink
31930d4de5
Provide BCD<->binary conversion in libkern and turn <dev/clock_subr.h>'s
...
FROMBCD()/TOBCD() macros into wrappers around it, resulting in both
smaller code footprint and elimination of possible issues due to
multiple evaluation of macro arguments.
Suggested by Simon Burge and Anders Gavare on tech-kern.
2006-03-11 15:40:07 +00:00
dyoung
cafe884d2c
Change macro names to avoid collisions:
...
BIT -> __BIT
BITS -> __BITS
2006-03-08 08:26:50 +00:00
dyoung
f66403a698
Move my bit-twiddling macros to libkern.h from my drivers, where
...
I had duplicated them. Improve the macros' names. Simplify their
implementation.
A brief description of each macro is below.
BIT(n): Return a bitmask with bit m set, where the least
significant bit is bit 0.
BITS(m, n): Return a bitmask with bits m through n, inclusive,
set. It does not matter whether m>n or m<=n.
The least significant bit is bit 0.
A "bitfield" is a span of consecutive bits defined by a
bitmask, where 1s select the bits in the bitfield. SHIFTIN,
SHIFTOUT, and SHIFTOUT_MASK help read and write bitfields
from device registers.
SHIFTIN(v, mask): Left-shift bits `v' into the bitfield
defined by `mask', and return them. No
side-effects.
SHIFTOUT(v, mask): Extract and return the bitfield selected
by `mask' from `v', right-shifting the
bits so that the rightmost selected bit
is at bit 0. No side-effects.
SHIFTOUT_MASK(mask): Right-shift the bits in `mask' so that
the rightmost non-zero bit is at bit
0. This is useful for finding the
greatest unsigned value that a bitfield
can hold. No side-effects. Note that
SHIFTOUT_MASK(m) = SHIFTOUT(m, m).
Examples:
/*
* Register definitions taken from the RFMD RF3000 manual.
*/
#define RF3000_GAINCTL 0x11 /* TX variable gain control */
#define RF3000_GAINCTL_TXVGC_MASK BITS(7, 2)
#define RF3000_GAINCTL_SCRAMBLER BIT(1)
/*
* Shift the transmit power into the transmit-power field of the
* gain-control register and write it to the baseband processor.
*/
atw_rf3000_write(sc, RF3000_GAINCTL,
SHIFTIN(txpower, RF3000_GAINCTL_TXVGC_MASK));
/*
* Register definitions taken from the ADMtek ADM8211 manual.
*
*/
#define ATW_RXSTAT_OWN BIT(31) /* 1: NIC may fill descriptor */
/* ... */
#define ATW_RXSTAT_DA1 BIT(17) /* DA bit 1, admin'd address */
#define ATW_RXSTAT_DA0 BIT(16) /* DA bit 0, group address */
#define ATW_RXSTAT_RXDR_MASK BITS(15,12) /* RX data rate */
#define ATW_RXSTAT_FL_MASK BITS(11,0) /* RX frame length, last
* descriptor only
*/
/* Extract the frame length from the Rx descriptor's
* status field.
*/
len = SHIFTOUT(rxstat, ATW_RXSTAT_FL_MASK);
2006-03-08 00:24:06 +00:00
perry
fbae48b901
Change "inline" back to "__inline" in .h files -- C99 is still too
...
new, and some apps compile things in C89 mode. C89 keywords stay.
As per core@.
2006-02-16 20:17:12 +00:00
uwe
0fc70b4831
Add bswap16.c and bswap32.c to SRCS. We need fallback versions for
...
kernels compiled without optimization (and thus without inlining of
bswap16 and bswap32)
2006-02-04 23:33:37 +00:00
uwe
e7b43156c5
Truncate the argument to 16 bit with extu.w
2006-02-04 22:24:26 +00:00
uwe
fe55d8a997
/* fall through */ -> /* FALLTHROUGH */
2006-01-27 02:28:36 +00:00
uwe
b04e9bed57
Support 'z' (size_t) and 't' (ptrdiff_t) specifiers.
...
XXX: ptrdiff_t is only ever defined in <stddef.h> and is defined
unconditionally, without the ifndef dance. Until we have an expert
opinion, abuse intptr_t for the 't' size check.
2006-01-27 01:53:13 +00:00
uwe
090e596149
Don't omit int arguments in the K&R style function definitions.
2006-01-27 01:11:27 +00:00
christos
e72f06abb2
Add the source directory of zlib in the include paths so that cread.c can
...
find zlib.h which is needed from <lib/libz/libz.h>.
2006-01-26 14:05:49 +00:00
uwe
ba7d6bc890
Sync alloc/dealloc prototypes with unsigned int -> size_t change.
2006-01-25 22:44:37 +00:00
christos
6645a4f37b
free -> dealloc
2006-01-25 18:27:23 +00:00
christos
8c98cc0872
- Add attributes to printf functions
...
- Fix attributes to noreturn functions
- free -> dealloc
- unsigned -> size_t for alloc, dealloc
2006-01-25 18:26:59 +00:00
christos
426a2fdd3b
Changing len from int to size_t caused an infinite loop. Noticed by chuq.
2006-01-25 13:46:09 +00:00
christos
8f67218a4b
PR/32613: Yves-Emmanuel JUTARD: Incoherencies in file sys/lib/libsa/net.h
...
- Make prototype of ether_sprintf() match the one in sys/net.
- Rename in_cksum to ip_cksum and fix its prototype. in_cksum() operates
on an mbuf and ip_cksum() operates on a plain buffer. We should not call
functions that operate on different arguments the same name (this is not
c++).
2006-01-24 17:07:19 +00:00
dsl
9813905f44
If _STANDALONE is defined, #include </lib/libsa/iodesc.h> instead of requiring
...
that the source that #includes net.h have lib/libsa in its include path.
In the non-_STANDALONE case make it easy for the user to supply their own iodesc.h.
2006-01-22 16:05:42 +00:00
dsl
05b5a4b77a
Adjust code so that it will work when _STANDALONE isn't defined.
...
Allows it to be used for mount_nfs when SMALL is set - eg install floppies/
2006-01-21 10:06:06 +00:00
uwe
ed89efb8bf
Define indp_t as signed int32_t, like ffsv1.c does.
2006-01-18 02:52:22 +00:00
christos
ddce00bf3c
Don't include zlib.h directly; redirect through libz.h; this mirrors how
...
libkern is done and let's us abstract where the real zlib.h is kept.
2006-01-14 20:16:44 +00:00
christos
b7c7f77db6
use zlib-1.2.3
2006-01-14 20:15:38 +00:00
christos
a6d61f6709
constify write prototype.
2006-01-13 22:32:10 +00:00
yamt
43308ea339
fix build of bzero.
...
XXX is it better to remove it as i386?
2005-12-27 08:49:35 +00:00
perry
4a2c58419f
__asm__ -> __asm
2005-12-24 23:29:06 +00:00
perry
0f0296d88a
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
2005-12-24 20:45:08 +00:00
christos
f852d21f71
Add the state setting functions for the new random function, but use the
...
small one by default, so that we can switch in the future if we want to.
2005-12-21 14:24:44 +00:00
christos
153f1146ed
Use common sources with userland.
2005-12-20 19:35:26 +00:00
christos
6fcf9fd532
Provide _DIAGASSERT and NULL, so that we don't have to do it in *all* the
...
libkern files.
Also the new inet_addr, provides inet_aton; advertise it.
2005-12-20 19:35:12 +00:00
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