Commit Graph

9577 Commits

Author SHA1 Message Date
nyan
db5f8a5b7b Merge two slice_type_name() functions. 2005-04-13 13:42:38 +00:00
davidxu
03aa59f2ee o Code cleanup, eliminate private thread id map, directly
use lwpid as thread id.
 o Export tls pointer.
2005-04-13 04:57:38 +00:00
davidxu
1f525cc190 Fill traceme and events fields. 2005-04-12 23:33:08 +00:00
davidxu
3093d067e4 Conditionally report initial thread event. 2005-04-12 03:13:49 +00:00
davidxu
bc36c64c8d Add missing event reporting code. 2005-04-12 03:08:11 +00:00
davidxu
6b1b88e88d Sync with debugger code in libthr. 2005-04-12 03:03:16 +00:00
davidxu
2cf5eeb001 Add debugger event reporting support, current only TD_CREATE and TD_DEATH
events are reported.
2005-04-12 03:00:28 +00:00
alc
b2ebe16689 Add a machine-specific, optimized implementation of strcat.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 18:58:49 +00:00
alc
420be8df92 Eliminate a conditional branch and as a side-effect eliminate a branch to
a return instruction.  (The latter is discouraged by the Opteron
optimization manual because it disables branch prediction for the return
instruction.)

Reviewed by: bde
2005-04-10 18:12:07 +00:00
delphij
ecb578572b Remove duplicated "bytes".
Submitted by:	Wojciech A. Koszek [dunstan freebsd czest pl]
PR:		79747
2005-04-10 12:15:25 +00:00
alc
417aec058f Add a machine-specific, optimized implementation of strcpy.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-10 05:11:06 +00:00
alc
654c522ae8 Add a machine-specific, optimized implementation of strcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-09 20:47:08 +00:00
ume
1b9c36cc46 unbreak build without YP defined.
Submitted by:	Andrea Campi <andrea+freebsd_cvs_at_webcom.it>
2005-04-09 14:20:18 +00:00
stefanf
d1df2201c0 Remove unused variables and assignments. 2005-04-08 21:24:23 +00:00
stefanf
edc96e2497 Use prototypes in the function definitions. 2005-04-08 21:15:38 +00:00
stefanf
460f9ad102 Remove unused variable. 2005-04-08 20:58:47 +00:00
alc
1ab7d22f97 Add machine-specific, optimized implementations of bcmp and memcmp.
PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-08 05:15:55 +00:00
alc
02ae1b51e3 Eliminate unneeded instructions that are a vestige of mechanical
translation from i386.
2005-04-08 05:10:18 +00:00
das
15bd306d7a Add roundl(), lroundl(), and llroundl(). 2005-04-08 01:24:08 +00:00
das
4df744a471 These files should include s_lround.c instead of s_lrint.c.
This only matters for efficiency, not for correctness.
2005-04-08 00:52:27 +00:00
das
9977034544 Fix a (coincidentally harmless) bug. 2005-04-08 00:52:16 +00:00
cognet
c7b04f713a Use the new atomic_cmpset_32(). 2005-04-07 22:06:05 +00:00
davidxu
22b6b1a4cf Adjust hash function for smaller pthread structure size. 2005-04-07 06:09:17 +00:00
alc
90a823ed92 Eliminate an unneeded instruction that is a vestige of mechanical
translation from i386.
2005-04-07 05:46:46 +00:00
peter
cb1b05e7a8 Fix strict-alias warnings by removing excessive (and wrong) casts. 2005-04-07 04:33:15 +00:00
alc
cbb9f3f415 Add machine-specific, optimized implementations of bcopy, bzero, memcpy,
memmove, and memset.

PR: 73111
Submitted by: Ville-Pertti Keinonen <will@iki.fi> (taken from NetBSD)
MFC after: 3 weeks
2005-04-07 03:56:03 +00:00
ume
aa9bf872c4 - we are no longer shareing any resources to be locked between
getaddrinfo(3) and getipnodeby*(3).
- use definitions in reentrant.h.
- remove obsolete comment.
2005-04-06 15:36:34 +00:00
ume
26cc55077b MUTEX_INITIALIZER should be used instead of
PTHREAD_MUTEX_INITIALIZER, here.
2005-04-06 15:16:04 +00:00
davidxu
ed60415691 Remove unique id field which is no longer used by debugger. 2005-04-06 13:57:31 +00:00
davidxu
a991e5caf8 Remove debug symbol from installed library, one can always
use compiled version in libthr directory.
2005-04-06 13:48:11 +00:00
ume
38e722e1a8 separate gai_strerror(3) from getaddrinfo.c.
Requested by:	phantom
2005-04-06 12:45:51 +00:00
kientzle
3e09e80261 A number of improvements to ZIP support.
* Handles entries with compressed size >2GB (signed/unsigned cleanup)
  * Handles entries with compressed size >4GB ("ZIP64" extension)
  * Handles Unix extensions (ctime, atime, mtime, mode, uid, etc)
  * Format-specific "skip data" override allows ZIP reader to skip
    entries without decompressing them, which makes "tar -t"
    a lot faster.
  * Handles "length-at-end" entries generated by, e.g., "zip -r - foo"

Many thanks to: Dan Nelson, who contributed the code and test files for
   the first three items above and suggested the fourth.
2005-04-06 04:19:30 +00:00
das
bb5d9cb768 Fix a long-standing bug in k_rem_pio2(), which led to large errors when
tanf() was called with big arguments close to multiples of pi/2.

Reported by:	ucbtest via bde
2005-04-05 23:27:47 +00:00
ume
b0c9c2a388 make yp stuff re-entrant.
Obtained from:	NetBSD
2005-04-05 18:25:23 +00:00
ume
ac4b9096b3 protect _yp_domain with mutex lock.
Inspired by:	NetBSD
2005-04-05 18:07:59 +00:00
ume
b24803b06b add missing mutex unlock. 2005-04-05 17:13:28 +00:00
phk
063486ce84 natd core dumps when -reverse switch is used because of a bug in
libalias.

In /usr/src/lib/libalias/alias.c, the functions LibAliasIn and
LibAliasOutTry call the legacy PacketAliasIn/PacketAliasOut instead
of LibAliasIn/LibAliasOut when the PKT_ALIAS_REVERSE option is set.
In this case, the context variable "la" gets lost because the legacy
compatibility routines expect "la" to be global.  This was obviously
an oversight when rewriting the PacketAlias* functions to the
LibAlias* functions.

The fix (as shown in the patch below) is to remove the legacy
subroutine calls and replace with the new ones using the "la" struct
as the first arg.

Submitted by:	Gil Kloepfer <fgil@kloepfer.org>
Confirmed by:	<nicolai@catpipe.net>
PR:		76839
MFC after:	3 days
2005-04-05 13:04:35 +00:00
davidxu
e911a0459c Export thread address. 2005-04-05 11:38:30 +00:00
das
1db6f984bc Build exp2(), exp2f(), and related documentation. 2005-04-05 02:57:39 +00:00
das
1324b71e9d Document exp2() and exp2f(), and make other minor tweaks and updates. 2005-04-05 02:57:28 +00:00
das
bf28283937 Implement exp2() and exp2f(). 2005-04-05 02:57:15 +00:00
davidxu
1b586b1fd5 Pass exact number of threads. 2005-04-04 23:43:53 +00:00
ume
cb0b5ed63a make _files_getaddrinfo() re-entrant.
Obtained from:	NetBSD
2005-04-04 19:45:27 +00:00
davidxu
399fdd028a Export pthread_condattr_getclock, pthread_condattr_setclock. 2005-04-03 23:52:29 +00:00
das
87aa297030 Replace the current strspn() and strcspn() with significantly faster
implementations inspired by the ones in DragonFly.  Unlike the
DragonFly versions, these have a small data cache footprint, and my
tests show that they're never slower than the old code except when the
charset or the span is 0 or 1 characters.  This implementation is
generally faster than DragonFly until either the charset or the span
gets in the ballpark of 32 to 64 characters.
2005-04-02 18:52:44 +00:00
das
1e73b68cbc Add some missing errnos from POSIX. Nothing in FreeBSD generates
these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
2005-04-02 12:33:28 +00:00
ume
420c834c87 nuke the logic for AF_UNSPEC and simplify. once, it was introduced
to improve getaddrinfo(3).  but, it is not needed for a long time
since getaddrinfo(3) became providing its own res_*N() functions.
2005-04-02 08:18:33 +00:00
davidxu
beebb880be Connect libthr and libthread_db to make buildworld. 2005-04-02 01:40:12 +00:00
davidxu
6c73121667 Update debugger code for new libthr. 2005-04-02 01:36:21 +00:00
davidxu
f066519e91 Import my recent 1:1 threading working. some features improved includes:
1. fast simple type mutex.
 2. __thread tls works.
 3. asynchronous cancellation works ( using signal ).
 4. thread synchronization is fully based on umtx, mainly, condition
    variable and other synchronization objects were rewritten by using
    umtx directly. those objects can be shared between processes via
    shared memory, it has to change ABI which does not happen yet.
 5. default stack size is increased to 1M on 32 bits platform, 2M for
    64 bits platform.
As the result, some mysql super-smack benchmarks show performance is
improved massivly.

Okayed by: jeff, mtm, rwatson, scottl
2005-04-02 01:20:00 +00:00