Commit Graph

57 Commits

Author SHA1 Message Date
bde
2b60d80b5b Removed unused #includes. 1997-08-02 14:33:27 +00:00
ache
4edf467e22 Style optimization in newly added POSIX range []] conformance, redo
'for' loop as do...while and remove variable unneded now
1997-06-07 01:33:10 +00:00
ache
3960867fa4 Add missing FNM_PERIOD check for '[' range
Don't treat !^ as first characters in the range, just as negate sign
[/] never match if FNM_PATHNAME
1997-06-06 22:33:28 +00:00
ache
7279a0810f 1) Now conforms POSIX.2 2.8.3.2 requirements about []] pattern
2) Treat unclosed [ range in pattern as regular characters (bash style)
1997-06-06 21:48:55 +00:00
jdp
0dd88b99c3 Fix a bug that caused some false mismatches when both FNM_PATHNAME
and FNM_LEADING_DIR were specified and the pattern ended with "*".
Example: pattern="src/usr.sbin/w*", string="src/usr.sbin/watch/watch.8,v".
This should match, but did not.
1997-04-29 03:24:57 +00:00
ache
ed64bf08bd Eliminate some function calls when locale not used 1997-04-04 19:08:19 +00:00
ache
41d9720a8f Speedup in case locale not used 1997-04-04 18:44:19 +00:00
peter
c8dcd04895 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
jkh
9c0cd3f9df Make the long-awaited change from $Id$ to $FreeBSD$
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.
1997-01-14 07:20:47 +00:00
ache
86548c66aa collate_range_cmp -> __collate_range_cmp 1996-10-31 04:32:27 +00:00
bde
d9bf0a4c81 Unremoved used #include of <sys/systm.h> for the !GUPROF case. 1996-10-25 06:58:53 +00:00
ache
d9fc1dc7c5 GNU-style changes:
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
1996-10-23 16:40:20 +00:00
wosch
7a03305256 add flag FNM_ICASE for case insensitve search
Reviewed by: ache
1996-10-20 15:15:59 +00:00
bde
e3aa1c3dc5 Improved non-statistical (GUPROF) profiling:
- 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
1996-10-17 19:32:31 +00:00
peter
289d8b4538 add simple srandom() and prototype 1996-09-23 04:31:43 +00:00
bde
a77006a164 Updated #includes to 4.4Lite style. 1996-09-10 08:32:01 +00:00
bde
b574768f3a Fixed the easy cases of const poisoning in the kernel. Cosmetic. 1996-08-31 16:52:44 +00:00
bde
357511715d Don't depend in the kernel on the gcc feature of doing arithmetic on
pointers of type `void *'.  Warn about this in future.
1996-08-31 14:48:13 +00:00
bde
4bb5c0495a Removed sccsids and rcsids and added Id$ to save space like everything
else in libkern.
1996-08-28 20:32:21 +00:00
bde
94fc722a2c Cleaned up interrupt masking by declaring the state variable in a
machine-dependent macro and passing it to all machine-dependent
macros.

Eliminated the state variable for the GUPROF case.
1996-08-28 20:15:32 +00:00
ache
9ed39675f3 Convert to newly aded collate compare function 1996-08-12 18:49:54 +00:00
ache
fda5493376 Use collate for alpha character ranges 1996-08-12 04:03:50 +00:00
jkh
a3b50e31fd General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
1996-07-12 18:57:58 +00:00
nate
de032949b8 Added index() which will be used shortly in some fixes to the ibcs2
emulation code.
1996-06-07 22:21:31 +00:00
phk
338ec01d0d removed:
CLBYTES PD_SHIFT PGSHIFT NBPG PGOFSET CLSIZELOG2 CLSIZE pdei()
        ptei() kvtopte() ptetov() ispt() ptetoav() &c &c
new:
        NPDEPG

Major macro cleanup.
1996-05-02 14:21:14 +00:00
bde
0e7b00764f Don't include <sys/types.h> when it isn't used.
This commit covers most of the ANSI library functions. Many others only
need <sys/types.h> because they use u_xxx.
1996-04-19 18:40:25 +00:00
bde
d2dbfdc192 Don't depend on <sys/types.h> including <sys/cdefs.h>. 1996-04-19 17:39:57 +00:00
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