summaryrefslogtreecommitdiffstats
path: root/sys/lib/libkern/libkern.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove non-__STDC__ assert macros from <lib/libkern/libkern.h>.visa2020-02-261-22/+1
| | | | | | | | The macros are defined in a part of the header where a C compiler is required. In addition, the macros expand to C code, so it looks unnecessary to define the asserts with traditional cpp in mind. OK cheloha@, mpi@
* use size_t for the size of buffers and strings, not int.dlg2018-04-251-2/+3
| | | | | | sprinkle some bounded attributes while here. ok deraadt@
* KASSERTMSG(9): New kernel assertion with messageuebayasi2014-07-131-1/+17
| | | | | | | | | | | | | | | | | | | | | | | KASSERT() is annoying as it only prints the expression as a string. If you (developers) want to know a little more information, you have to do: #ifdef DIAGNOSTIC if (bad) panic(...); #endif KASSERTMSG() replaces it into a single line: KASSERTMSG(!bad, ...); Taken from NetBSD. (There is a concern that KASSERT() messages are too long; consume more memory, and not friendly for small monitors. This have to be considered & revisited later.) "Like" from henning@ Man page review & advices from jmc@ and schwarze@
* mop up #ifdef _KERNEL goo; ok miodderaadt2014-06-101-1/+2
|
* Initialize ci_randseed better using arc4random() + a trick. Remove thederaadt2014-01-191-2/+1
| | | | | libkern srandom() API since it is not suitable for this use. ok kettenis miod
* add fls/flsl functions to find the last bit set in a valuejsg2013-07-111-1/+3
| | | | | from FreeBSD ok mikeb@ haesbaert@ deraadt@
* Add CTASSERT macro, for compile time assertionssf2013-06-081-1/+4
| | | | ok kettenis@
* Add strnlen() to libkern.matthew2012-04-261-1/+2
| | | | ok deraadt
* add a new function, explicit_bzero, to be used for erasing "secret" stuff.tedu2011-01-101-1/+2
| | | | | | | unlike normal bzero, we guarantee that the compiler will not optimize out calls to this function for otherwise dead variables. to be adjusted as needed when compilers and linkers get smarter. ok deraadt miod
* Add OpenSSH's timingsafe_bcmp() to libkern.matthew2010-07-201-1/+2
| | | | ok djm@, deraadt@
* ansi func declsjsg2009-05-241-19/+10
|
* make random(9) return per-cpu values (by saving the seed in the cpuinfo),deraadt2008-10-151-3/+3
| | | | | | | which are uniform for the profclock on each cpu in a SMP system (but using a different seed for each cpu). on all cpus, avoid seeding with a value out of the [0, 2^31-1] range (since that is not stable) ok kettenis drahn
* locc() is dead, spotted by miodderaadt2007-05-041-2/+1
|
* move bcd tables to the only place that uses them (the unused mcd driver);deraadt2007-05-041-5/+1
| | | | ok miod
* ansi and some missing protosderaadt2004-08-071-2/+3
|
* add bounded attribute to some functions. anil tested and ok'editojun2004-06-211-4/+7
|
* add back strchr/strrchr; from dhartmeideraadt2004-05-061-1/+3
|
* Remove strcat() and strcpy() prototypes since we no longer have thosemillert2003-06-231-3/+1
| | | | functions in kernel-land. Noticed by Jim Rees; OK deraadt@
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-021-6/+2
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* First round of __P removal in sysmillert2002-03-141-30/+30
|
* strlcat and strlcpy into libkern.provos2000-12-181-1/+3
|
* Pull memcmp() into libkern.millert2000-06-161-1/+2
|
* missed from last bcd2bin commitmickey1997-11-301-1/+5
|
* add prototype for memchrchuck1997-11-041-1/+2
|
* From NetBSD: assert stuffniklas1997-09-141-1/+39
|
* Removed strchr() for libkern.millert1997-05-051-2/+1
|
* Alpha needs strchr.cmillert1997-05-041-2/+2
| | | | | | Fix up clean and depend targets in Makefile.inc so we can include Makefile.inc in cases where there is already a clean/depend target (based on a NetBSD Makefile.inc).
* no more 2(two) md5 libs in kernel!mickey1997-03-301-3/+1
| | | | | | | tested for rnd(4).... should work for ip too, since it's the copy of ip_md*. use sys/md5k.h for protos.... std iface forever! hurray!
* protect from multiple includes (required by gpl_math_emulate)mickey1997-01-181-1/+6
|
* Promise to not change arg 2 & 3 to scancniklas1996-12-061-2/+2
|
* Move MD5 protos to a more sensible placeniklas1996-08-111-1/+3
|
* srandom() seeds random() at boottimederaadt1996-08-101-1/+2
|
* add getsn(char *buf, int len)deraadt1996-06-161-1/+2
|
* NetBSD 960317 mergeniklas1996-04-191-21/+29
|
* From NetBSD: Merge with NetBSD 960217niklas1996-02-291-2/+6
|
* initial import of NetBSD treederaadt1995-10-181-0/+117