Commit Graph

8803 Commits

Author SHA1 Message Date
David Xu
dd094c943d Copy lwp id to thread mailbox. 2004-07-14 00:58:53 +00:00
David Xu
e378b41cb4 Call kse_switchin to switch context when being debugged. 2004-07-13 22:54:23 +00:00
David Xu
63db3fb215 Remove unused symbols. 2004-07-13 22:53:56 +00:00
David Xu
5c1a1421fe Export necessary symbols to debugger. 2004-07-13 22:52:53 +00:00
David Xu
c7f5b2dbc5 Let debugger check signal, make SIGINFO works. 2004-07-13 22:52:11 +00:00
David Xu
099e4630c1 If _libkse_debug is not zero, activate thread mode. 2004-07-13 22:51:03 +00:00
David Xu
566382df0a Add code to support thread debugging.
1. Add global varible _libkse_debug, debugger uses the varible to identify
   libpthread. when the varible is written to non-zero by debugger, libpthread
   will take some special action at context switch time, it will check
   TMDF_DOTRUNUSER flags, if a thread has the flags set by debugger, it won't
   be scheduled, when a thread leaves KSE critical region, thread checks
   the flag, if it was set, the thread relinquish CPU.

2. Add pq_first_debug to select a thread allowd to run by debugger.

3. Some names prefixed with _thr are renamed to _thread prefix.

which is allowed to run by debugger.
2004-07-13 22:49:58 +00:00
Tim J. Robbins
ee5d8a1b0a Remove an entry from the BUGS section: we have multibyte character
support now.
2004-07-12 11:03:42 +00:00
David Xu
a5dc4a8255 kse_switchin ABI was changed in kernel. 2004-07-12 07:41:01 +00:00
Tim J. Robbins
e5996857ad Make regular expression matching aware of multibyte characters. The general
idea is that we perform multibyte->wide character conversion while parsing
and compiling, then convert byte sequences to wide characters when they're
needed for comparison and stepping through the string during execution.

As with tr(1), the main complication is to efficiently represent sets of
characters in bracket expressions. The old bitmap representation is replaced
by a bitmap for the first 256 characters combined with a vector of individual
wide characters, a vector of character ranges (for [A-Z] etc.), and a vector
of character classes (for [[:alpha:]] etc.).

One other point of interest is that although the Boyer-Moore algorithm had
to be disabled in the general multibyte case, it is still enabled for UTF-8
because of its self-synchronizing nature. This greatly speeds up matching
by reducing the number of multibyte conversions that need to be done.
2004-07-12 07:35:59 +00:00
Tim J. Robbins
67aff1896c Add a new error code, REG_ILLSEQ, to indicate that a regular expression
contains an illegal multibyte character sequence.
2004-07-12 06:07:26 +00:00
Marcel Moolenaar
b41e0f0f56 Document the new PT_LWPINFO request. In fact, the request is so new
it hasn't even been implemented yet. I just wanted to be the first
to try a new approach to development ;-)
2004-07-12 04:43:58 +00:00
Tim Kientzle
47aa50e155 Update the README notes to include the current list of supported
formats and remove some outdated comments about library limitations.
2004-07-12 01:54:37 +00:00
Tim J. Robbins
80f363668e Remove incomplete support for multi-character collating elements. Remove
unused character category calculations.
2004-07-11 05:58:31 +00:00
Tim Kientzle
320adc42ea Correct a brain-o in extract_dir: mkdirpath() and mkdir(2) are
not interchangable.
2004-07-10 18:10:20 +00:00
Marcel Moolenaar
f5eda2f1cb Unbreak alpha: On alpha a long double is the same as a double and
consequently the exponent is only 11 bits. Testing whether the
exponent equals 32767 in that case only effects to compiler warnings
and thus build breakage.
2004-07-10 15:52:26 +00:00
Tim J. Robbins
550473de5b Add fast paths for conversion of plain ASCII characters. 2004-07-09 15:46:06 +00:00
Tim J. Robbins
fcc5191787 Slightly reorganize and simplify. 2004-07-09 15:12:10 +00:00
David Schultz
9fc5c45bad Remove the declaration of isnan() from this file. It is no longer
needed as of math.h v1.40, and its prototype is incorrect here.
2004-07-09 10:01:10 +00:00
David Schultz
ad93428d7a Bump document date for recent changes.
Prodded by:	ru
2004-07-09 06:37:44 +00:00
David Schultz
3bdf026534 Document these functions as being in libm, not libc. Some of them
*are* in libc for historical reasons, but programmers should not rely
on that fact.

Also remove a BUGS section that is not relevant here.
2004-07-09 03:33:00 +00:00
David Schultz
240dbabfa8 Implement the classification macros isfinite(), isinf(), isnan(), and
isnormal() the hard way, rather than relying on fpclassify().  This is
a lose in the sense that we need a total of 12 functions, but it is
necessary for binary compatibility because we have never bumped libm's
major version number.  In particular, isinf(), isnan(), and isnanf()
were BSD libc functions before they were C99 macros, so we can't
reimplement them in terms of fpclassify() without adding a dependency
on libc.so.5.  I have tried to arrange things so that programs that
could be compiled in FreeBSD 4.X will generate the same external
references when compiled in 5.X.  At the same time, the new macros
should remain C99-compliant.

The isinf() and isnan() functions remain in libc for historical
reasons; however, I have moved the functions that implement the macros
isfinite() and isnormal() to libm where they belong.  Moreover,
half a dozen MD versions of isinf() and isnan() have been replaced
with MI versions that work equally well.

Prodded by:	kris
2004-07-09 03:32:40 +00:00
David Schultz
b2d5d0b376 Define the following macros in terms of [gi]cc builtins when the
builtins are available: HUGE_VAL, HUGE_VALF, HUGE_VALL, INFINITY,
and NAN.  These macros now expand to floating-point constant
expressions rather than external references, as required by C99.
Other compilers will retain the historical behavior.  Note that
it is not possible say, e.g.
#define	HUGE_VAL	1.0e9999
because the above may result in diagnostics at translation time
and spurious exceptions at runtime.  Hence the need for compiler
support for these features.

Also use builtins to implement the macros isgreater(),
isgreaterequal(), isless(), islessequal(), islessgreater(),
and isunordered() when such builtins are available.
Although the old macros are correct, the builtin versions
are much faster, and they avoid double-expansion problems.
2004-07-09 03:31:09 +00:00
Garrett Wollman
5b1eaa7bb6 Eliminate some magic numbers and correct description of _PC_NO_TRUNC.
Slight emendation to _PC_CHOWN_RESTRICTED, which is in a very similar
boat.
2004-07-08 20:27:38 +00:00
Hartmut Brandt
aed56f6cad Add the new call control layer to the library and install the man page
for the service access point (SAP) stuff now that it is really available.
2004-07-08 17:09:55 +00:00
Tim J. Robbins
ee446de0b1 Add a function to iterate over all characters in a particular character
class. This is necessary in order to implement tr(1) efficiently in
multibyte locales, since the brute force method of finding all characters
in a class is infeasible with a 32-bit (or wider) wchar_t.
2004-07-08 06:43:37 +00:00
Tim Kientzle
cbf4203db5 I think this is my fourth complete rewrite of the dir-creation
code. <whew!> This version handles all of the following edge cases:
  * Restoring explicit dirs with 000 permissions (star fails this test)
  * Restore of implicit or explicit dirs when umask=777
    (gtar and star both fail this test)
  * Restoring dir paths containing "." and ".." components
This version initially creates all dirs with permission 700 (ignoring
umask), then does a post-extract "fixup" pass to set the correct
permissions (which may or may not depend on umask, depending on the
restore flags and whether it's an explicit or implicit dir).
Permissions are restored depth-first so that permissions within
non-writable dirs can be correctly restored. (The depth-sorting does
correctly account for dirs with ".." components.)
2004-07-08 05:24:48 +00:00
Maksim Yevmenkin
23d1e148af Make bluetooth compile on all platforms
Reviewed by:	imp, ru
2004-07-07 22:48:30 +00:00
Alfred Perlstein
83f46f9e33 there's no such define as KERN_NAME_MAX, change to _POSIX_NAME_MAX. 2004-07-07 20:47:42 +00:00
Ruslan Ermilov
fd13236829 Markup fixes. 2004-07-07 20:25:54 +00:00
Ruslan Ermilov
5792ef0983 Markup nits. 2004-07-07 20:15:31 +00:00
Ruslan Ermilov
1c5f1e7afd Fixed markup. 2004-07-07 20:11:35 +00:00
Ruslan Ermilov
2410103c1d mdoc(7) fixes. 2004-07-07 19:57:16 +00:00
Hiten Pandya
af73aa7cce Move the return value information about the getenv(3) library function
under the RETURN VALUES section so it is consistent with others.

Cleanup the return value text for getenv(3) a little while I am here.

PR:     	docs/58033
MFC after:	3 days
2004-07-06 23:21:36 +00:00
Andrey A. Chernov
42aeacc4d4 Keep it sync with OpenBSD:
An optional argument cannot start with '-', even if permutation is
disabled.

Obtained from: OpenBSD getopt_long.c v1.17
2004-07-06 13:58:45 +00:00
Dag-Erling Smørgrav
de47739e71 Push WARNS back up to 6, but define NO_WERROR; I want the warts out in the
open where people can see them and hopefully fix them.
2004-07-06 12:15:24 +00:00
Dag-Erling Smørgrav
9fa0fd2682 Introduce inline {ip,udp,tcp}_next() functions which take a pointer to an
{ip,udp,tcp} header and return a void * pointing to the payload (i.e. the
first byte past the end of the header and any required padding).  Use them
consistently throughout libalias to a) reduce code duplication, b) improve
code legibility, c) get rid of a bunch of alignment warnings.
2004-07-06 12:13:28 +00:00
Dag-Erling Smørgrav
e3e2c21639 Rewrite twowords() to access its argument through a char pointer and not
a short pointer.  The previous implementation seems to be in a gray zone
of the C standard, and GCC generates incorrect code for it at -O2 or
higher on some platforms.
2004-07-06 09:22:18 +00:00
Tim J. Robbins
65b2e19ef7 Document incorrect handling of multibyte characters. 2004-07-06 09:20:51 +00:00
Dag-Erling Smørgrav
95347a8ee0 Temporarily lower WARNS to 3 while I figure out the alignment issues on
alpha.
2004-07-06 08:44:41 +00:00
David Schultz
9428e108c9 Add C99's nearbyint{,f}() functions as wrappers around rint().
These trivial implementations are about 25 times slower than
rint{,f}() on x86 due to the FP environment save/restore.
They should eventually be redone in terms of fegetround() and
bit fiddling.
2004-07-06 04:46:08 +00:00
David Schultz
b03b864ac9 Add implementations of ftw(3) and nftw(3) and the corresponding header
ftw.h.  This is the implementation written by Joel Baker
<fenton@debian.org> for inclusion in NetBSD, but with several
bugfixes.

Obtained from:	Debian
2004-07-05 23:13:16 +00:00
David Schultz
c8f7bbe36b Documentation for ftw(3) and nftw(3).
Obtained from:	OpenBSD
2004-07-05 23:12:11 +00:00
Tim Kientzle
2859e75d07 Minor wordsmithing; remove a controversial colon. 2004-07-05 19:44:35 +00:00
Tim Kientzle
f586f10d0d Add convenience functions to retrieve the atime fields directly,
without having to first pull the stat structure.
2004-07-05 18:11:44 +00:00
Tim Kientzle
7228b0c18b ru@'s ambitious sweep through the manpages is mostly a good thing,
but some colons are supposed to be followed by uppercase letters.
2004-07-05 18:08:32 +00:00
Ruslan Ermilov
0d0f025292 Make whatis(1) happy about the NAME section.
Slightly fix markup and grammar.
2004-07-05 17:38:08 +00:00
Ruslan Ermilov
51f98e585b Fix the NAME section making whatis(1) happy in particular. 2004-07-05 17:12:53 +00:00
Ruslan Ermilov
37266c4b94 Unbreak a whatis(1) entry by fixing the NAME section.
Minor markup and grammar nits.
2004-07-05 16:32:30 +00:00
Dag-Erling Smørgrav
ed01a58215 Make libalias WARNS?=6-clean. This mostly involves renaming variables
named link, foo_link or link_foo to lnk, foo_lnk or lnk_foo, fixing
signed / unsigned comparisons, and shoving unused function arguments
under the carpet.

I was hoping WARNS?=6 might reveal more serious problems, and perhaps
the source of the -O2 breakage, but found no smoking gun.
2004-07-05 11:10:57 +00:00