Commit Graph

30 Commits

Author SHA1 Message Date
phk
8690b2cd5f Extend to handle all radix < 37 1996-01-24 20:51:26 +00:00
bde
86c1865c4d Moved BCD declarations to the correct header (libkern.h).
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.
1996-01-16 10:23:22 +00:00
phk
b44eddf452 My wife is busy making me a new conical hat, so you don't need to
send any to me this time.  Commited an old copy of this files where
the tables were swapped.  Duh!.
1996-01-15 21:26:43 +00:00
phk
942d28db30 Add the bcd <-> bin and hex -> ascii tables. 1996-01-15 10:03:49 +00:00
peter
639da796bd recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
bde
5b16274ed3 Copied mcount.c from the library again. #include'ing it via a relative
path to a possibly-nonexistent place didn't work well enough.  Sigh.
1995-12-30 07:24:13 +00:00
bde
5af66827d5 Implemented non-statistical kernel profiling. This is based on
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.
1995-12-29 15:30:05 +00:00
bde
6f711e75eb Removed almost all traces of libkern.a. The objects that were in
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.
1995-12-26 13:58:31 +00:00
bde
9bf8a2bda0 Added prototypes. 1995-12-26 13:25:13 +00:00
nate
f5daa923b2 Add-back strlen.c to the library in case a kernel is compiled without
optimization.  Gcc only in-lines calls to strlen with optimization
turned on.
1995-12-19 19:47:05 +00:00
phk
1c856312e8 Add qsort() to libkern, taken from libc. 1995-11-08 08:40:11 +00:00
phk
2322bfc03a Comment out, but don't delete stuff we don't use.
Classify in "gcc stuff" and "legitimate stuff".
1995-10-05 14:46:07 +00:00
bde
15ed2564d9 Rearrange the inner loop of scanc() to get better code on i*86's
(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.
1995-07-11 18:50:47 +00:00
rgrimes
b6f07b22b2 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
rgrimes
1c444a9f7e Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
rgrimes
78ce042756 Do not install libkern into /usr/lib, blank target install: added. 1995-03-23 07:02:14 +00:00
phk
4ef64a373a <libkern/libkern.h> has moved to <sys/libkern.h> (repository copy).
Since /usr/include/libkern doesn't and shouldn't exist, this is the
least evil way to handle this.
1995-03-17 06:15:40 +00:00
bde
69e0f79830 Add and move declarations to fix all of the warnings from `gcc -Wimplicit'
(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.
1995-03-16 18:17:34 +00:00
wollman
f72d2ba667 Add inet_ntoa() and replace ARP's private routine with same. 1995-03-16 17:32:27 +00:00
ugen
1247d59417 Add strncmp() function..I need it and
hope nobody will eat me alive for this..:)
1995-02-27 09:16:04 +00:00
bde
3617b16ab5 Always build libkern_p.a. `NOPROFILE' should only control user libraries. 1995-01-10 01:57:56 +00:00
bde
bfeb77ab3e Hide the declaration of ffs() if an inline ffs() is implemented.
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.
1994-11-14 14:56:46 +00:00
jkh
43add4e5ec I'm going to nuke strtol() for now. Now I need strncmp() and rather
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.
1994-10-26 11:14:21 +00:00
jkh
23e602d47c Add strtol() to libkern in support of some other work I'm doing.
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! :-)
1994-10-25 14:57:57 +00:00
bde
08d0a25b4c Use new-style declarations for min/max functions so that
"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).
1994-09-18 23:04:25 +00:00
paul
71bdc2add9 Added -DKERNEL and added support for kernel profiling.
Reviewed by:	Bruce
1994-09-15 15:41:48 +00:00
dg
50727e0179 Added qmin and qmax functions to deal with quad_t's. 1994-08-30 18:19:47 +00:00
dg
07b8b5ff37 Added $Id$ 1994-08-02 07:55:43 +00:00
rgrimes
b533bb0399 BSD 4.4 Lite Lib Sources 1994-05-27 05:00:24 +00:00
rgrimes
8fb65ce818 BSD 4.4 Lite Kernel Sources 1994-05-24 10:09:53 +00:00