Commit Graph

23 Commits

Author SHA1 Message Date
bouyer dc306354b0 Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
1999-01-15 13:31:15 +00:00
perry 6ea886d397 add memcmp.S 1998-08-04 01:40:57 +00:00
perry a8627d22ba Fix formatting, and add memmove.S 1998-08-04 01:14:36 +00:00
mycroft 52541a2efb Move random.S from arch/i386/i386. 1998-02-22 08:14:56 +00:00
mycroft b65caec4a0 Add strchr.S and strrchr.S. 1998-02-22 07:03:08 +00:00
mycroft 943421399e Sync with libc. 1998-02-22 06:40:17 +00:00
mycroft ab7671a45e Add some missing things. 1998-02-22 06:08:37 +00:00
cgd 4369378a6c add rules like those in libc to build strchr() and strrchr() (the latter
is being added to libkern by this commit).  remove strchr.c from
archs' Makefile.inc files to go along with this.  (If an arch has
a .S version, it should be copied down and added to the apropriate
Makefile.inc.)
1998-01-21 21:23:18 +00:00
chuck cf924e3bc0 add memchr() to libkern 1997-10-24 15:32:24 +00:00
bouyer 6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
cgd d867ed50cc add strchr() to libkern. strchr.c copied from libc's "index.c", but with
appropriate definitions so that it'll build strchr(), and so that it builds
correctly in libkern (needed to #define NULL).
1997-01-18 02:33:38 +00:00
cgd bdbfa48c0b Add machine-independent assertion-checking support. macros are:
assert()	which always does assertion checking
			unless "NDEBUG" is defined.

	KASSERT()	which does assertion checking if DIAGNOSTIC
			is defined.

	KDASSERT()	which does assertion checking if DEBUG is
			define.  This macro exists for compatibility
			with existing ports' assertion checking macros.
			(Assertion checking is not typically an
			"expensive" operation, and DIAGNOSTIC should be
			used for inexpensive consistency checks.)
1996-08-27 00:44:20 +00:00
cgd 352d972c94 locc() is unused. Remove it from the machine-independent kernel interface. 1996-06-10 15:33:33 +00:00
cgd e70b1375c9 add strncasecmp.c to ports' libkern Makefile.inc's. When adding a new
source file to libkern, it should be added to _ALL_ ports makefiles if
it is machine-independent and used by machine-independent code (in
this case adosfs).  (There are several arguments that say that
strncasecmp should not be in libkern at all, and i think they're
good ones, but as long as ADOSFS needs it to link, it has to be here
for all architectures.)
1996-04-13 01:17:27 +00:00
scottr c31eae0510 Back out previous change. 1996-03-11 05:31:59 +00:00
thorpej e142a2195f Provide a memset() for the i386 (assembly version), and move memset.c
out into the libkern proper in case other ports want to use it.
i386 kernels with COMPAT_LINUX should compile now.
1996-03-11 03:19:37 +00:00
mycroft 120925e7c3 Remove bzero.S and setjmp.S, as these functions are in locore. 1995-10-07 09:52:48 +00:00
cgd aa9eacdd59 new RCS ID format. 1994-10-26 06:39:02 +00:00
mycroft afe588b9d2 Assembler versions of these. 1994-02-24 00:41:00 +00:00
cgd 1e98b770b2 use .S files 1993-12-04 05:21:29 +00:00
cgd 2193c056b8 add strncmp to anything 1993-10-15 08:41:12 +00:00
cgd acbf63a86b add __main() 1993-10-15 06:20:46 +00:00
cgd 2d4295eb29 move 'boot' and 'libkern' into 'lib'. generally clean up 'kernel library'
building and dependencies.
1993-10-13 05:40:23 +00:00