Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove non-__STDC__ assert macros from <lib/libkern/libkern.h>. | 2020-02-26 | 1 | -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. | 2018-04-25 | 1 | -2/+3 | |
| | | | | | | sprinkle some bounded attributes while here. ok deraadt@ | ||||
* | KASSERTMSG(9): New kernel assertion with message | 2014-07-13 | 1 | -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 miod | 2014-06-10 | 1 | -1/+2 | |
| | |||||
* | Initialize ci_randseed better using arc4random() + a trick. Remove the | 2014-01-19 | 1 | -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 value | 2013-07-11 | 1 | -1/+3 | |
| | | | | | from FreeBSD ok mikeb@ haesbaert@ deraadt@ | ||||
* | Add CTASSERT macro, for compile time assertions | 2013-06-08 | 1 | -1/+4 | |
| | | | | ok kettenis@ | ||||
* | Add strnlen() to libkern. | 2012-04-26 | 1 | -1/+2 | |
| | | | | ok deraadt | ||||
* | add a new function, explicit_bzero, to be used for erasing "secret" stuff. | 2011-01-10 | 1 | -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. | 2010-07-20 | 1 | -1/+2 | |
| | | | | ok djm@, deraadt@ | ||||
* | ansi func decls | 2009-05-24 | 1 | -19/+10 | |
| | |||||
* | make random(9) return per-cpu values (by saving the seed in the cpuinfo), | 2008-10-15 | 1 | -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 miod | 2007-05-04 | 1 | -2/+1 | |
| | |||||
* | move bcd tables to the only place that uses them (the unused mcd driver); | 2007-05-04 | 1 | -5/+1 | |
| | | | | ok miod | ||||
* | ansi and some missing protos | 2004-08-07 | 1 | -2/+3 | |
| | |||||
* | add bounded attribute to some functions. anil tested and ok'ed | 2004-06-21 | 1 | -4/+7 | |
| | |||||
* | add back strchr/strrchr; from dhartmei | 2004-05-06 | 1 | -1/+3 | |
| | |||||
* | Remove strcat() and strcpy() prototypes since we no longer have those | 2003-06-23 | 1 | -3/+1 | |
| | | | | functions in kernel-land. Noticed by Jim Rees; OK deraadt@ | ||||
* | Remove the advertising clause in the UCB license which Berkeley | 2003-06-02 | 1 | -6/+2 | |
| | | | | rescinded 22 July 1999. Proofed by myself and Theo. | ||||
* | First round of __P removal in sys | 2002-03-14 | 1 | -30/+30 | |
| | |||||
* | strlcat and strlcpy into libkern. | 2000-12-18 | 1 | -1/+3 | |
| | |||||
* | Pull memcmp() into libkern. | 2000-06-16 | 1 | -1/+2 | |
| | |||||
* | missed from last bcd2bin commit | 1997-11-30 | 1 | -1/+5 | |
| | |||||
* | add prototype for memchr | 1997-11-04 | 1 | -1/+2 | |
| | |||||
* | From NetBSD: assert stuff | 1997-09-14 | 1 | -1/+39 | |
| | |||||
* | Removed strchr() for libkern. | 1997-05-05 | 1 | -2/+1 | |
| | |||||
* | Alpha needs strchr.c | 1997-05-04 | 1 | -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! | 1997-03-30 | 1 | -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) | 1997-01-18 | 1 | -1/+6 | |
| | |||||
* | Promise to not change arg 2 & 3 to scanc | 1996-12-06 | 1 | -2/+2 | |
| | |||||
* | Move MD5 protos to a more sensible place | 1996-08-11 | 1 | -1/+3 | |
| | |||||
* | srandom() seeds random() at boottime | 1996-08-10 | 1 | -1/+2 | |
| | |||||
* | add getsn(char *buf, int len) | 1996-06-16 | 1 | -1/+2 | |
| | |||||
* | NetBSD 960317 merge | 1996-04-19 | 1 | -21/+29 | |
| | |||||
* | From NetBSD: Merge with NetBSD 960217 | 1996-02-29 | 1 | -2/+6 | |
| | |||||
* | initial import of NetBSD tree | 1995-10-18 | 1 | -0/+117 | |