summaryrefslogtreecommitdiffstats
path: root/sys/libkern
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate some function calls when locale not usedache1997-04-041-6/+4
|
* Speedup in case locale not usedache1997-04-041-2/+6
|
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2236-36/+36
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-1436-36/+36
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* collate_range_cmp -> __collate_range_cmpache1996-10-311-3/+4
|
* Unremoved used #include of <sys/systm.h> for the !GUPROF case.bde1996-10-251-1/+4
|
* GNU-style changes:ache1996-10-231-10/+14
| | | | | | | 1) Rename FNM_ICASE to FNM_CASEFOLD 2) Add FNM_LEADING_DIR Add proper (unsigned char) casts to tolower(). Use 'char' function argument for proper sign extension
* add flag FNM_ICASE for case insensitve searchwosch1996-10-201-1/+20
| | | | Reviewed by: ache
* Improved non-statistical (GUPROF) profiling:bde1996-10-171-72/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use a more accurate and more efficient method of compensating for overheads. The old method counted too much time against leaf functions. - normally use the Pentium timestamp counter if available. On Pentiums, the times are now accurate to within a couple of cpu clock cycles per function call in the (unlikely) event that there are no cache misses in or caused by the profiling code. - optionally use an arbitrary Pentium event counter if available. - optionally regress to using the i8254 counter. - scaled the i8254 counter by a factor of 128. Now the i8254 counters overflow slightly faster than the TSC counters for a 150MHz Pentium :-) (after about 16 seconds). This is to avoid fractional overheads. files.i386: permon.c temporarily has to be classified as a profiling-routine because a couple of functions in it may be called from profiling code. options.i386: - I586_CTR_GUPROF is currently unused (oops). - I586_PMC_GUPROF should be something like 0x70000 to enable (but not use unless prof_machdep.c is changed) support for Pentium event counters. 7 is a control mode and the counter number 0 is somewhere in the 0000 bits (see perfmon.h for the encoding). profile.h: - added declarations. - cleaned up separation of user mode declarations. prof_machdep.c: Mostly clock-select changes. The default clock can be changed by editing kmem. There should be a sysctl for this. subr_prof.c: - added copyright. - calibrate overheads for the new method. - documented new method. - fixed races and and machine dependencies in start/stop code. mcount.c: Use the new overhead compensation method. gmon.h: - changed GPROF4 counter type from unsigned to int. Oops, this should be machine-dependent and/or int32_t. - reorganized overhead counters. Submitted by: Pentium event counter changes mostly by wollman
* add simple srandom() and prototypepeter1996-09-231-2/+10
|
* Updated #includes to 4.4Lite style.bde1996-09-105-10/+10
|
* Fixed the easy cases of const poisoning in the kernel. Cosmetic.bde1996-08-313-8/+9
|
* Don't depend in the kernel on the gcc feature of doing arithmetic onbde1996-08-311-10/+10
| | | | pointers of type `void *'. Warn about this in future.
* Removed sccsids and rcsids and added Id$ to save space like everythingbde1996-08-283-17/+5
| | | | else in libkern.
* Cleaned up interrupt masking by declaring the state variable in abde1996-08-281-6/+5
| | | | | | | machine-dependent macro and passing it to all machine-dependent macros. Eliminated the state variable for the GUPROF case.
* Convert to newly aded collate compare functionache1996-08-121-3/+3
|
* Use collate for alpha character rangesache1996-08-121-1/+4
|
* General -Wall warning cleanup, part I.jkh1996-07-121-1/+1
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Added index() which will be used shortly in some fixes to the ibcs2nate1996-06-071-0/+53
| | | | emulation code.
* removed:phk1996-05-021-2/+2
| | | | | | | | | CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei() ptei() kvtopte() ptetov() ispt() ptetoav() &c &c new: NPDEPG Major macro cleanup.
* Don't include <sys/types.h> when it isn't used.bde1996-04-191-2/+1
| | | | | This commit covers most of the ANSI library functions. Many others only need <sys/types.h> because they use u_xxx.
* Don't depend on <sys/types.h> including <sys/cdefs.h>.bde1996-04-191-1/+2
|
* Extend to handle all radix < 37phk1996-01-241-1/+2
|
* Moved BCD declarations to the correct header (libkern.h).bde1996-01-161-25/+25
| | | | | | | | Fixed BCD declarations. They didn't match their definitions... libkern.h, bcd.c: KNFised. `indent' worked 99% perfectly on bcd.c. It worked 99% _imperfectly_ on subr_prf.c.
* My wife is busy making me a new conical hat, so you don't need tophk1996-01-151-2/+2
| | | | | send any to me this time. Commited an old copy of this files where the tables were swapped. Duh!.
* Add the bcd <-> bin and hex -> ascii tables.phk1996-01-151-0/+34
|
* recording cvs-1.6 file deathpeter1995-12-302-193/+0
|
* Copied mcount.c from the library again. #include'ing it via a relativebde1995-12-301-3/+325
| | | | path to a possibly-nonexistent place didn't work well enough. Sigh.
* Implemented non-statistical kernel profiling. This is based onbde1995-12-291-179/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | looking at a high resolution clock for each of the following events: function call, function return, interrupt entry, interrupt exit, and interesting branches. The differences between the times of these events are added at appropriate places in a ordinary histogram (as if very fast statistical profiling sampled the pc at those places) so that ordinary gprof can be used to analyze the times. gmon.h: Histogram counters need to be 4 bytes for microsecond resolutions. They will need to be larger for the 586 clock. The comments were vax-centric and wrong even on vaxes. Does anyone disagree? gprof4.c: The standard gprof should support counters of all integral sizes and the size of the counter should be in the gmon header. This hack will do until then. (Use gprof4 -u to examine the results of non-statistical profiling.) config/*: Non-statistical profiling is configured with `config -pp'. `config -p' still gives ordinary profiling. kgmon/*: Non-statistical profiling is enabled with `kgmon -B'. `kgmon -b' still enables ordinary profiling (and distables non-statistical profiling) if non-statistical profiling is configured.
* Removed almost all traces of libkern.a. The objects that were inbde1995-12-261-37/+0
| | | | | | | libkern.a are now specified by listing their source files in files.${MACHINE}. The list is machine-dependent to save space. All the necessary object for each machine must be linked into the kernel in case an lkm wants one.
* Added prototypes.bde1995-12-262-5/+15
|
* Add-back strlen.c to the library in case a kernel is compiled withoutnate1995-12-191-6/+5
| | | | | optimization. Gcc only in-lines calls to strlen with optimization turned on.
* Add qsort() to libkern, taken from libc.phk1995-11-082-1/+175
|
* Comment out, but don't delete stuff we don't use.phk1995-10-051-6/+18
| | | | Classify in "gcc stuff" and "legitimate stuff".
* Rearrange the inner loop of scanc() to get better code on i*86'sbde1995-07-111-2/+10
| | | | | | | | | | | (on an i486, 10 cycles (+ cache misses) instead of 15). The change should be a no-op if the compiler is any good. The best possible i*86 code for the same algorithm is only 1 more cycle faster on i486's so I don't want to bother implementing an assembler version. scanc() is a bottleneck for OPOST processing. It is naturally about 4 times as slow as bcopy() on 32-bit systems.
* Remove trailing whitespace.rgrimes1995-05-304-8/+8
|
* Remove trailing whitespace.rgrimes1995-05-302-3/+3
|
* Do not install libkern into /usr/lib, blank target install: added.rgrimes1995-03-231-1/+3
|
* <libkern/libkern.h> has moved to <sys/libkern.h> (repository copy).phk1995-03-174-8/+8
| | | | | Since /usr/include/libkern doesn't and shouldn't exist, this is the least evil way to handle this.
* Add and move declarations to fix all of the warnings from `gcc -Wimplicit'bde1995-03-161-1/+3
| | | | | | (except in netccitt, netiso and netns) and most of the warnings from `gcc -Wnested-externs'. Fix all the bugs found. There were no serious ones.
* Add inet_ntoa() and replace ARP's private routine with same.wollman1995-03-162-5/+54
|
* Add strncmp() function..I need it andugen1995-02-272-2/+58
| | | | hope nobody will eat me alive for this..:)
* Always build libkern_p.a. `NOPROFILE' should only control user libraries.bde1995-01-101-1/+3
|
* Hide the declaration of ffs() if an inline ffs() is implemented.bde1994-11-141-1/+3
| | | | | | | | | | | | | | I couldn't find a better way to avoid compiler warnings about redundant and/or inconsistent declaration of ffs(). I'd like to be able to declare prototypes in general headers without committing to implementing them as `static inline' or `extern', but there seems to be no way to do this with gcc-2.6.1. E.g., int foo(void); static __inline int foo(void) { return 1; } causes a warning about the linkage mismatch, while the opposite order causes a warning about the redundant declaration.
* I'm going to nuke strtol() for now. Now I need strncmp() and ratherjkh1994-10-261-2/+2
| | | | | | | that add it too, and end up fighting an unwanted battle right now, I'm just going to back away from both and start including my own private copies of everything. I'm not going to use _anything_ from libkern until we decide its fate.
* Add strtol() to libkern in support of some other work I'm doing.jkh1994-10-252-3/+131
| | | | | | I just know I'm going to get flamed for adding for the miserable abortion that is libkern, but what am I supposed to do? At least I didn't drag in the ctype stuff! :-)
* Use new-style declarations for min/max functions so thatbde1994-09-181-62/+11
| | | | | | | | | | | | | | | | "gcc -Wstrict-prototypes" doesn't emit warnings about them. Write each min/max functions on a single line so that the similarity and triviality of the functions is more obvious. Put the quad min/max functions in the correct place (aphabetical order). The u_quad min/max functions are missing. Only 3 or 4 of the min/max functions are actually used. sys/socketvar.h ``should use "lmin" but it doesn't exist now''. lmin does exist now, but isn't used. Since we depend on gcc for `inline', perhaps we should depend on it for __typeof and function-expressions and use only macros min() and max() that work for any types (I'm not sure how to handle mixed types).
* Added -DKERNEL and added support for kernel profiling.paul1994-09-152-3/+7
| | | | Reviewed by: Bruce
* Added qmin and qmax functions to deal with quad_t's.dg1994-08-301-1/+14
|
* Added $Id$dg1994-08-0235-108/+65
|
OpenPOWER on IntegriCloud