Commit Graph

10682 Commits

Author SHA1 Message Date
ume
538856133a stop use of mutex lock in ICMP lookup.
MFC after:	1 week
2006-07-23 07:07:49 +00:00
ume
7169bc1ce5 remove obsolete comments.
MFC after:	3 days
2006-07-22 14:36:56 +00:00
ume
636a28fc75 simplification in explore_numeric: unified the post-process with
GET_AI and GET_PORT.  Commented on an impossible case.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 19:02:28 +00:00
ume
34bbbddd7e RFC3493 requires use of inet_aton for AF_INET.
Obtained from:	KAME
MFC after:	1 week
2006-07-21 19:00:22 +00:00
ume
9cc6e84d28 clean-up: rewrote explore_null and explore_numeric without using sentinel.
we do not need it since we make (at most) a single addrinfo entry in these
cases.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 18:57:44 +00:00
ume
cd6fe37440 - draft-ietf-ipngwg-icmp-namelookups-09
- make it compilable

It still requires root privilege and is experimental.

Obtained from:	KAME
MFC after:	1 week
2006-07-21 18:55:51 +00:00
stefanf
f16a2dfec0 Use variadic macros that comply with C99. Keep the GCC-style ones if
DEBUG is defined and GCC is used.
2006-07-17 20:39:08 +00:00
stefanf
6cdb8f6653 Change the GCC specific __FUNCTION__ to C99's __func__.
OK'ed by:	des
2006-07-17 11:48:52 +00:00
stefanf
d83fcb992a Make the variadic macro debug() comply to C99. 2006-07-17 09:33:24 +00:00
stefanf
01c3a07e52 Use a prototype for res_init().
MFC after:	3 days
2006-07-17 09:27:26 +00:00
delphij
36c285d128 Unexpand two TAILQ_FOREACH_SAFE cases.
Ok'ed by:	davidxu
2006-07-17 09:23:44 +00:00
imp
5d17f2bbe1 Note the convention that humanize_number follows.
Add 'engineering' numbers to table.
2006-07-15 20:53:36 +00:00
maxim
e03f872cad o compat_group() and files_group() are more complicated than I thought
in rev. 1.34.  Mainly I missed the fact that the buffer is used for two
purposes:

1) storing a group line from the group file;

2) __gr_parse_entry() parses the buffer and tries to put the group
members to the remaining part of the buffer and can fail if there
is no enough room for them.

Re-arrange the buffer size checks to account the latter case.

Submitted by:	Kirk R Webb
MFC after:	2 weeks
2006-07-14 17:45:33 +00:00
davidxu
2b1dbc0acb Caching scheduling policy and priority in userland, a critical but baddly
written application is frequently changing thread priority for SCHED_OTHER
policy.
2006-07-13 22:45:19 +00:00
davidxu
19b8418903 Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implement
pthread functions.
2006-07-13 06:35:43 +00:00
maxim
9db24c22ff o Add missed comma, xref kld(4). 2006-07-12 14:33:52 +00:00
davidxu
ecacf536b0 Use kernel facilities to support real-time scheduling. 2006-07-12 06:13:18 +00:00
davidxu
f53e1c9383 __error could be called too early before libthr is initialized, test
this case and return global varible errno instead.
2006-07-12 03:44:05 +00:00
rwatson
1c2b8b40e8 Following repo-copy of mac_is_present_np.3 to mac_is_present.3, remove
old file, update references, etc.  The C function is already named
mac_is_present().

Obtained from:	TrustedBSD Project
2006-07-07 14:02:17 +00:00
bde
3d1bfe752d Fixed the threshold for using the simple Taylor approximation.
In e_log.c, there was just a off-by-1 (1 ulp) error in the comment
about the threshold.  The precision of the threshold is unimportant,
but the magic numbers in the code are easier to understand when the
threshold is described precisely.

In e_logf.c, mistranslation of the magic numbers gave an off-by-1
(1 * 16 ulps) error in the intended negative bound for the threshold
and an off-by-7 (7 * 16 ulps) error in the intended positive bound for
the threshold, and the intended bounds were not translated from the
double precision bounds so they were unnecessarily small by a factor
of about 2048.

The optimization of using the simple Taylor approximation for args
near a power of 2 is dubious since it only applies to a relatively
small proportion of args, but if it is done then doing it 2048 times
as often _may_ be more efficient.  (My benchmarks show unexplained
dependencies on the data that increase with further optimizations
in this area.)
2006-07-07 04:33:08 +00:00
bde
ebfec8dd17 Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <
2**-28 as a side effect, by merging with the float precision version
of tanh() and the double precision version of sinh().

For tiny x, tanh(x) ~= x, and we used the expression x*(one+x) to
return this value (x) and set the inexact flag iff x != 0.  This
doesn't work on ia64 since gcc -O does the dubious optimization
x*(one+x) = x+x*x so as to use fma, so the sign of -0.0 was lost.

Instead, handle tiny x in the same as sinh(), although this is imperfect:
- return x directly and set the inexact flag in a less efficient way.
- increased the threshold for non-tinyness from 2**-55 to 2**-28 so that
  many more cases are optimized than are pessimized.

Updated some comments and fixed bugs in others (ranges for half-open
intervals mostly had the open end backwards, and there were nearby style
bugs).
2006-07-05 22:59:33 +00:00
bde
ac26a61be9 Removed the optimized asm versions of scalb() and scalbf(). These
functions are only for compatibility with obsolete standards.  They
shouldn't be used, so they shouldn't be optimized.  Use the generic
versions instead.

This fixes scalbf() as a side effect.  The optimized asm version left
garbage on the FP stack.  I fixed the corresponding bug in the optimized
asm scalb() and scalbn() in 1996.  NetBSD fixed it in scalb(), scalbn()
and scalbnf() in 1999 but missed fixing it in scalbf().  Then in 2005
the bug was reimplemented in FreeBSD by importing NetBSD's scalbf().

The generic versions have slightly different error handling:
- the asm versions blindly round the second parameter to a (floating
  point) integer and proceed, while the generic versions return NaN
  if this rounding changes the value.  POSIX permits both behaviours
  (these functions are XSI extensions and the behaviour for a bogus
  non-integral second parameter is unspecified).   Apart from this
  and the bug in scalbf(), the behaviour of the generic versions seems
  to be identical.  (I only exhusatively tested
  generic_scalbf(1.0F, anyfloat) == asm_scalb(1.0F, anyfloat).  This
  covers many representative corner cases involving NaNs and Infs but
  doesn't test exception flags.  The brokenness of scalbf() showed up
  as weird behaviour after testing just 7 integer cases sequentially.)
2006-07-05 20:06:42 +00:00
bde
31501671ae Backed out rev.1.10. It tried to implement ldexpf() as a weak reference
to scalbf(), but ldexpf() cannot be implemented in that way since the
types of the second parameter differ.  ldexpf() can be implemented as
a weak or strong reference to scalbnf() (*) but that was already done
long before rev.1.10 was committed.  The old implementation uses a
reference, so rev.1.10 had no effect on applications.  The C files for
the scalb() family are not used for amd64 or i386, so rev.1.10 had even
less effect for these arches.

(*) scalbnf() raises the radix to the given exponent, while ldexpf()
raises 2 to the given exponent.  Thus the functions are equivalent
except possibly for their error handling iff the radix is 2.  Standards
more or less require identical error handling.  Under FreeBSD, the
functions are equivalent except for more details being missing in
scalbnf()'s man page.
2006-07-05 02:16:29 +00:00
jasone
64896f5bfe Use some math tricks in arena_run_reg_dalloc() to avoid actual division, as
well as avoiding a switch statement.  This change has no significant impact
to performance when branch prediction is successful at predicting the sizes
of objects passed to free(), but in the case that the object sizes are
semi-random, this change has the potential to prevent many branch prediction
misses, thus improving performance substantially.

Take advantage of alignment guarantees in ipalloc(), and pad object sizes to
something less than a power of two when possible.  This has the potential
to substantially reduce internal fragmentation for objects allocated via
posix_memalign().

Avoid an unnecessary pow2_ceil() call in arena_ralloc().

Submitted by:	djam8193ah@hotmail.com
2006-07-01 16:51:10 +00:00
jasone
e6aa0aff3e Make the behavior of malloc(0) standards-compliant by getting rid of nil,
and instead creating a small allocation for each malloc(0) call.  The
optional SysV compatibility behavior remains unchanged.

Add a couple of assertions.

Fix a couple of typos in error message strings.
2006-06-30 20:54:15 +00:00
keramida
bc2961a729 twalk() expects an `action' function not a comparison function.
The text is correct in the "DESCRIPTION" section, so fix "SYNOPSIS"
to use the correct name.

PR:		docs/90498
Submitted by:	Vasil Dimov
MFC after:	3 days
2006-06-23 13:36:33 +00:00
brian
b33fcf8840 Remove some unused variables 2006-06-23 01:42:03 +00:00
kib
b90260e703 Make the mincore(2) return ENOMEM when requested range is not fully mapped.
Requested by:	Bruno Haible <bruno at clisp org>
Reviewed by:	alc
Approved by:	pjd (mentor)
MFC after:	1 month
2006-06-21 12:59:05 +00:00
jasone
c69739a898 Add a missing case for the switch statement in arena_run_reg_dalloc(). [1]
Fix a leak in chunk_dealloc(). [2]

Reported by:	[1] djam8193ah@hotmail.com,
		[2] Ville-Pertti Keinonen <will@exomi.com>
2006-06-20 20:38:25 +00:00
obrien
35c9358d6c Update for the 'file' 4.17 import. 2006-06-19 08:10:23 +00:00
maxim
3c4a758003 o Typo: ownship -> ownership.
Obtained from:	DragonFlyBSD
2006-06-17 07:25:58 +00:00
maxim
3e4e0ea538 o Make grep ^strlcpy work: put a return value type on separate line. 2006-06-15 15:56:55 +00:00
maxim
569fed19c7 o Sort .Xrs. 2006-06-13 12:49:14 +00:00
phk
71b866ca8e Add xref to statfs(2) 2006-06-13 12:23:22 +00:00
des
eb329791f1 Respect FETCH_BIND_ADDRESS when opening the data connection.
PR:		misc/98872
2006-06-13 10:21:03 +00:00
des
a5357a7c3f Fix a bug introduced in rev 1.92, where, when changing from one directory
to another, the first CWD after a string of CDUPs would incorrectly include
a slash before the directory name.

Reported by:	obrien
PR:		bin/83278
2006-06-13 10:19:59 +00:00
akiyama
f9f3be843b Specify default path for SHLIBDIR before bsd.own.mk does.
This fix shared library installed correct place.
2006-06-11 09:14:06 +00:00
delphij
1489501378 Don't build IPv6 support if we have choosen not to have it. 2006-06-09 18:11:29 +00:00
maxim
7b9c5e1df6 o Remove a cruft prevented libpthread sigaction(2) wrapper to
do its work for SIGINFO.  Always install libpthread signal handler
wrapper for SIGINFO even if user SIG_IGN's or SIG_DFL's it.

SIGINFO has a special meaning for libpthread: when LIBPTHREAD_DEBUG
enviroment variable defined it is used for dumping an information
about threads to /tmp/.

Reported by:	mi
Reviewed by:	deischen
MFC after:	2 weeks
2006-06-09 14:23:40 +00:00
emax
023ff94b67 Fix an unwanted gcc4 warning.
Submitted by:	delphij
MFC after:	3 days
2006-06-06 16:58:19 +00:00
delphij
6a40c2e8f1 - ANSIfy.
- Remove two unnecessary casts.

These changes would help gcc4 compile.
2006-06-05 18:22:13 +00:00
kib
4de8a3e010 Replace absolute addressing in the call instructions with position-independend
calls. This eliminates TEXTREL from libc, making its text segment relocatable.

PR:	i386/85242
Approved by:	kan (mentor)
MFC after:	1 month
2006-06-05 14:59:33 +00:00
rwatson
b01f756066 Add audit_submit.3 to the set of man pages built and installed with
libbsm.  This interface is new as of OpenBSM 1.0 alpha 6.

Submitted by:	csjp
Obtained from:	TrustedBSD Project
2006-06-05 12:53:44 +00:00
delphij
5f36307f91 Include strings.h for bzero() 2006-06-05 08:51:14 +00:00
davidxu
be54fdbbff Remove unused member. 2006-06-03 00:19:40 +00:00
davidxu
523fcb36a8 Remove unused member field m_queue. 2006-06-02 08:37:01 +00:00
maxim
b479e3f6b6 o Record a file offset for a last successfully parsed group file line.
If the initial buffer size (1KB) for the given group line is not big
enough, reset the offset.  It helps to do not miss this line when
getrg() reallocates the larger buffer and tries to parse the line again.

PR:		bin/52433, kern/55031, bin/83696, misc/97640, misc/98111
Submitted by:	bsw71@mail.ru, Philip M. Gollucci, Justin Erenkrantz
Glanced at:	nectar
MFC after:	1 month
2006-06-01 15:45:06 +00:00
maxim
38d68c5332 o Document the fact truncate(2) has no effect for !VDIR or !VREG files.
Submitted by:	ceri
2006-06-01 14:20:43 +00:00
delphij
6e4a34202a Explicitly request pre-zeroed memory instead of memset'ing our
own.

Ok'ed by:	davidxu
2006-05-31 00:31:38 +00:00
ru
ae17e6dc54 Fix the output.
Noticed by:	rodrigc
2006-05-27 09:04:43 +00:00
delphij
43da20f970 - Add include for libutil.h and string.h for prototype.
- Cast the rvalue to be compared with the result of
   strlen() to size_t.
2006-05-25 04:01:04 +00:00
imp
d8754ee1e5 GC old a.out and K&R support. 2006-05-23 02:52:14 +00:00
marius
6e5a4bfa4c GC these crt{begin,end}.c, which are unused since the last FreeBSD platform
switched to those created from GCC's crtstuff.c 4 years ago.
2006-05-22 19:30:02 +00:00
ache
8c58df695f Reflect int -> size_t changes in glob.h 2006-05-22 06:53:35 +00:00
ache
c4b12e59b3 Reflect size_t changes in glob.h
Obtained from: NetBSD (mostly)
2006-05-22 06:33:19 +00:00
ache
38d8afc67c Remove pending actions asked in comments for SHLIB_MAJOR bump, done.
Reviewed by:    ume
2006-05-22 05:12:44 +00:00
ache
cdef42a42e Remove the kludge, as asked in the Makefile:
# If you bump SHLIB_MAJOR, remove the kluge from gen/gethostname.c.

Reviewed by:    ume
2006-05-22 05:04:53 +00:00
ume
2d16d1ab8e Bump library majro version for gethostbyaddr(3). 2006-05-21 15:15:21 +00:00
ume
34c051a94d Nuke some compatibility crufts of resolver for 6.X and earlier.
X-MFC after:	never
2006-05-21 11:29:26 +00:00
ume
dce008dac9 Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1 on 64 bit
arch.

X-MFC after:	never
2006-05-21 11:27:28 +00:00
ume
c499297986 Return EAI_OVERFLOW instead of EAI_MEMORY when the supplied buffer is
too short.  This conforms to RFC3493, POSIX and XPG6.

Obtained from:	NetBSD
2006-05-21 11:22:31 +00:00
ume
2103e7a60f Upgrade res_update(3) and the friends to BIND9's one excluding TSIG
support.

X-MFC after:	never
2006-05-21 11:19:36 +00:00
ume
0cedd121cc This commit was generated by cvs2svn to compensate for changes in r158782,
which included commits to RCS files with non-trunk default branches.
2006-05-21 11:10:07 +00:00
ume
c94e44e424 Vendor import of BIND 9.3.2 2006-05-21 11:10:07 +00:00
rodrigc
1b048fc4a5 Remove reference to "System call restart" in intro(2). intro(2) does not
have such a reference.  Add a reference instead to SA_RESTART in
sigaction(2).
2006-05-20 21:49:03 +00:00
maxim
78e642c1bb o .Xr strtonum(3).
MFC after:	1 week
2006-05-20 21:11:35 +00:00
jkim
48fe54ed7f Correct decoding a string containing '/'.
PR:		97485
Submitted by:	Mikko Tyolajarvi < mbsd at pacbell dot net >
2006-05-19 19:06:38 +00:00
davidxu
abd1aa54e6 Fix return value. 2006-05-17 05:14:45 +00:00
davidxu
c28c63ba32 get thread signal info. 2006-05-17 05:12:42 +00:00
davidxu
28aa53a45c Export offsets of thread signal pending set and signal mask for debugger. 2006-05-17 04:59:59 +00:00
keramida
6bb3d81c63 * Document the fact that non-superusers cannot change file flags for
objects with SF_IMMUTABLE, SF_APPEND, or SF_NOUNLINK.
* Document that non-superusers cannot set or clear any SF_* flag
  (setting fails with EPERM, clearing is silently ignored).
* Document that superusers cannot change any flag if one of
  SF_IMMUTABLE, SF_APPEND, SF_NOUNLINK is set and securelevel is
  greater than 0.
* Document SF_SNAPSHOT and note that it is maintained by the
  system and is, for this reason, impossible to set to clear by
  any user.

PR:             docs/33877
Submitted by:   harti
Help by:        George Marsellis <gam9478@njit.edu>
MFC after:      1 week
2006-05-16 20:24:41 +00:00
des
456f2593a5 Add a manual dependency on ssh_namespace.h.
Discussed with:	ru
2006-05-13 21:38:16 +00:00
des
148092431d Introduce a namespace munging hack inspired by NetBSD to avoid polluting
the namespace of applications which inadvertantly link in libssh (usually
through pam_ssh)

Suggested by:	lukem@netbsd.org
MFC after:	6 weeks
2006-05-13 13:47:45 +00:00
ume
ab3eacdf31 Fix gethostbyaddr() prototype to conform to IEEE Std 1003.1:
http://www.opengroup.org/onlinepubs/009695399/functions/gethostbyaddr.html

gethostbyaddr_r() is changed as well.
It breaks ABI backward compatibility on 64 bit arch.  So, we fix it
on 32 bit arch only for now.

Reported by:	Rostislav Krasny <rosti.bsd@gmail.com>
2006-05-12 15:37:23 +00:00
davidxu
8c3ceaf20b Save errno before calling pthread_mutex_lock because pthread_mutex_lock
may change errno unexpectly.
2006-05-11 09:10:33 +00:00
davidxu
975a6925fe Add symbol versions: FBSD_1.0 and FBSDprivate. 2006-05-11 07:02:52 +00:00
jasone
2ed3ff7341 Increase the minimum chunk size by a power of two (32kB --> 64kB, assuming
4kB pages), in order to avoid dangerous rounding error when calculating
fullness limits during run promotion/demotion.

Convert a structure bitfield to a normal field in areana_run_t.  This should
have been changed along with the other fields in revision 1.120.
2006-05-10 00:07:45 +00:00
davidxu
bbcf536040 In order to let new binutils can compile it, replace movl with
movw for segment saving and restoring.

Submitted by: Diego 'Flameeyes' Petteno flameeyes at gentoo dot org
2006-05-07 08:19:04 +00:00
bsd
bdb4511692 A few minor wording changes and a clarification about error conditions. 2006-05-03 17:33:29 +00:00
ume
90151bff3d Fix alignment problem on AMD64.
Reported by:	Pascal Hofstee <caelian__at__gmail.com>
Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Tested by:	Pascal Hofstee <caelian__at__gmail.com>
2006-05-02 23:02:32 +00:00
kientzle
1dca8f1e6a Simplify some of the wide-character handling, inspired
in part by OpenBSD's not-quite-standard-compliant
standard libraries.  (No loss of functionality,
just minor recoding to not rely on certain "standard"
facilities that weren't actually needed.)
2006-05-01 01:02:19 +00:00
kientzle
a86c768d03 Whitespace cleanup. 2006-05-01 00:55:44 +00:00
ume
86fb2d93f4 cache' couldn't co-exist with compat'.
Submitted by:	"Michael Bushkov" <bushman__at__rsu.ru>
2006-04-30 21:25:00 +00:00
marcus
e3a87fd595 Go with a different version of the previous patch so to preserve errno.
Approved by:	scottl (implicit)
2006-04-30 07:08:43 +00:00
marcus
6e43077eab Fix a file descriptor leak in cam_lookup_pass() when the ioctl to find
the passthru device fails.

Approved by:	scottl
MFC after:	1 day
2006-04-30 07:02:40 +00:00
ume
e14f1c3b3b - Extend the nsswitch to support Services, Protocols and Rpc
databases.
- Make nsswitch support caching.

Submitted by:	Michael Bushkov <bushman__at__rsu.ru>
Sponsored by:	Google Summer of Code 2005
2006-04-28 12:03:38 +00:00
davidxu
6a9d879cfe s/long/int. 2006-04-27 08:25:13 +00:00
davidxu
66d0fee031 - Use same priority range returned by kernel's sched_get_priority_min()
and sched_get_priority_max() syscalls.
- Remove unused fields from structure pthread_attr.
2006-04-27 08:18:23 +00:00
jasone
3ddbb17f57 Change the semantics of brk_max to dynamically deal with data segment
bounds. [1]

Modify logic for utilizing the data segment, such that it is possible to
create huge allocations there.

Shrink the data segment when deallocating a chunk, if it is at the end of
the data segment.

Rename chunk_size to csize in huge_malloc(), in order to avoid masking a
static variable of the same name. [1]

Reported by:	Paul Allen <nospam@ugcs.caltech.edu>
2006-04-27 01:03:00 +00:00
maxim
480c31c3fc o Add IDs for Plan9, QNX4.X, Mac OS-X, Linux exteneded partitions.
PR:		bin/96326
Submitted by:	Alex Kozlov
MFC after:	2 weeks
2006-04-25 20:42:15 +00:00
dwmalone
b6a2964430 Add some new options to mac_bsdestended. We can now match on:
subject: ranges of uid, ranges of gid, jail id
	objects: ranges of uid, ranges of gid, filesystem,
		object is suid, object is sgid, object matches subject uid/gid
		object type

We can also negate individual conditions. The ruleset language is
a superset of the previous language, so old rules should continue
to work.

These changes require a change to the API between libugidfw and the
mac_bsdextended module. Add a version number, so we can tell if
we're running mismatched versions.

Update man pages to reflect changes, add extra test cases to
test_ugidfw.c and add a shell script that checks that the the
module seems to do what we expect.

Suggestions from: rwatson, trhodes
Reviewed by: trhodes
MFC after: 2 months
2006-04-23 17:06:18 +00:00
davidxu
8001df6f90 Remove multiple _get_curthread() calls. 2006-04-23 11:23:37 +00:00
deischen
31b4d2103e Oops, correct the weak reference (s/fclose/fcloseall).
Spotted by:	Antoine Brodin (antoine _dot_ brodin _at_ laposte _dot_ net)
2006-04-22 16:47:59 +00:00
deischen
01e52c3884 Now that libc has fcloseall(), remove _cleanup() from the list
of FreeBSD private symbols.
2006-04-22 15:11:33 +00:00
deischen
fa251f3c89 Add fcloseall() to libc. This removes the need to export _cleanup().
Linux also provides an fcloseall() implementation.

Discussed on:	arch
2006-04-22 15:09:15 +00:00
trhodes
ef3a255b54 Update for rev 1.205 of vm_mmap.c.
Submitted by:	fanf
2006-04-21 07:22:55 +00:00
peter
aeeca95e16 Teach libkvm how to read minidumps. It turns out that minidumps are
far more convenient for libkvm to work with because of the page table
block at the beginning.  As a result, the MD code is smaller.

libkvm will automatically detect old vs mini dumps on i386 and amd64.

libkvm will handle i386 PAE and non-PAE modes.  There is a PAE flag in
the i386 minidump header to signal the width of the entries in the
page table block.

Other convenient values are also present, such as kernbase and the direct
map addresses on amd64.
2006-04-21 04:32:51 +00:00
brueffer
7ea2a54c0b Document how the backoff delay is calculated.
Submitted by:	markus
MFC after:	3 days
2006-04-19 17:46:27 +00:00
ceri
fa12985124 Correct usage example.
PR:		docs/95059
Submitted by:	Jos Backus
MFC after:	4 days
2006-04-18 21:37:24 +00:00
maxim
0720b52d5e o dbm_close(3) returns void not zero or anything else. Touch .Dd.
PR:		docs/80070
Submitted by:	Aleksej Saushev
MFC after:	2 weeks
2006-04-16 16:33:26 +00:00
marius
dfe4122cfa For _Qp_{fge,fgt,fle,flt}() the SCD states that "Exceptions mimic fcmpeq",
this means they should set the cmpe flag when calling __fpu_compare().

Submitted by:	stefanf
MFC after:	2 weeks
2006-04-16 14:32:53 +00:00
ume
b6bb84cf9e - make reentrant version of netdb functions glibc style API, and
expose them to outside of libc.
- make netdb functions NSS friendly.

Reviewed by:	arch@ and current@ (no objection)
2006-04-15 16:20:27 +00:00
deischen
6c39badccc Don't export __gdtoa. The only known ports that rely on
this or the deprecated POSIX functions {e,g,f}cvt() have
newer versions that do not (rely on them).

Requested by:	marius
2006-04-15 15:35:20 +00:00
maxim
385ea606db o Document SO_NOSIGPIPE, touch .Dd.
PR:		docs/78479
Submitted by:	Mikko Tyolajarvi
MFC after:	2 weeks
2006-04-15 13:37:35 +00:00
ru
8dfa3f1483 List pwritev in the NAME section. 2006-04-14 19:34:07 +00:00
schweikh
0e78beb323 s/soley/solely 2006-04-13 18:19:44 +00:00
ru
f7d1aac02a Apply style.Makefile(5) here. 2006-04-13 08:12:31 +00:00
ru
38b115ac20 Install the shared library under /usr/lib; it's not used by anything
in /bin or /sbin.

Not objected to by:	phk
2006-04-13 08:08:21 +00:00
ru
0d7c003380 Place shared libpcap library under /lib, currently needed by
/sbin/ipf and /sbin/pflogd.

OK'ed by:	mlaier
2006-04-13 07:25:02 +00:00
delphij
cf4eda6001 Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY.
Ok'ed by:	davidxu
2006-04-13 03:09:34 +00:00
ru
6f911199b8 Fix a symlink. 2006-04-12 19:51:14 +00:00
ru
450f399135 Install shared libpthread library into /lib; needed by some
/sbin programs.
2006-04-12 19:42:20 +00:00
jmg
a2a4e2db32 use pwrite to always write at the begining of the file.. If multiple calls
to pidfile_write happen, the pidfile will have nul characters prepended
due to the cached file descriptor offset...

Reviewed by:	scottl
MFC after:	3 days
2006-04-11 23:10:02 +00:00
marius
8bcd4b660f - Move _Qp_* and __dtoul from FBSDprivate to the list of FBSD_1.0 symbols
as well as add __sparc_utrap_install to FBSD_1.0; these are required by
  the SCD libc 64 psABI and thus meant to be officially exported symbols.
- Remove the __fpu_* entries as well as the __sigtramp entry altogether as
  these are internal to the libc FPU emulation and the signal trampoline
  initialization in sigaction(2) respectively and thus don't need to be
  externally visible.
- Add __sparc_utrap_setup to the list of FBSDprivate symbols as it's used
  in src/lib/csu/sparc64/crt1.c to initialize the libc FPU emulation (I
  think alternatively src/lib/csu/sparc64/crt1.c could be changed to use
  __sparc_utrap_install instead, at the expense of increasing the size of
  executables a bit).
- Add an entry for the vfork symbol to the FBSD_1 list and entries for it's
  associated symbols generated by the RSYSCALL() macro to the FBSDprivate
  list. There's some magic in place that automatically generates code for
  vfork() if there's no explicit MD code for it so it might make sense to
  move these symbols from the MD symbol map files to a MI one.

The last two changes make the libc symbol versioning useable on sparc64.

Ok'ed by:	deischen
2006-04-11 19:43:36 +00:00
brueffer
9fbf53f0d0 Document that VIS_CSTYLE encodes space (040) as '\s'.
PR:		95546
Submitted by:	Jan Schaumann <jschauma@netmeister.org>
MFC after:	3 days
2006-04-09 16:39:43 +00:00
ume
a48ae17ef6 Don't test if RES_INIT is set to see res_state structure is
initialized.  Some application may reset RES_INIT.  Use the
way in __res_vinit(), instead.
2006-04-08 18:19:35 +00:00
davidxu
7d0c23506c Do not check validity of timeout if a mutex can be acquired immediately.
Completly drop recursive mutex in pthread_cond_wait and restore recursive
after resumption. Reorganize code to make gcc to generate better code.
2006-04-08 13:24:44 +00:00
jasone
2f4016efa3 Add an unreachable return statement, in order to avoid a compiler warning
for non-standard optimization levels.

Reported by:	Michael Zach <zach@webges.com>
2006-04-05 18:46:24 +00:00
jasone
53b0978842 Only initialize the first per-chunk page map element for free runs. This
makes run split/coalesce operations of complexity lg(n) rather than n.
2006-04-05 04:15:12 +00:00
jasone
06e487e0f3 Add malloc_usable_size() to the RETURN VALUES section. 2006-04-04 20:27:53 +00:00
jasone
b2f560b56d Add init_lock, and use it to protect against allocator initialization
races.  This isn't currently necessary for libpthread or libthr, but
without it external threads libraries like the linuxthreads port are
not safe to use.

Reported by:	ganbold@micom.mng.net
2006-04-04 19:46:28 +00:00
jasone
ecc5750010 Refactor per-run bitmap manipulation functions so that bitmap offsets only
have to be calculated once per allocator operation.

Make nil const.

Update various comments.

Remove/avoid division where possible.

For the one division operation that remains in the critical path, add a
switch statement that has a case for each small size class, and do division
with a constant divisor in each case.  This allows the compiler to generate
optimized code that does not use hardware division [1].

Obtained from:	peter [1]
2006-04-04 03:51:47 +00:00
davidxu
f921934131 Remove declaration of _thr_initial from MD header file, it is no longer
needed.
2006-04-04 03:35:26 +00:00
davidxu
8bff50a485 Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.
Only i386 and amd64 have been done, others still have to be tested.
2006-04-04 03:26:06 +00:00
davidxu
31f2b819c6 WARNS level 4 cleanup. 2006-04-04 02:57:49 +00:00
phk
a6edaf1c5c Add missing #if's for NO_FLOATING_POINT 2006-04-01 19:06:54 +00:00
ume
5965562ffe fix indent. 2006-04-01 15:53:39 +00:00
deischen
db7df4904a Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,
this is used by some 3rd party applications when {e,f,g}cvt() are
not found.  POSIX defines the xcvt() funtions but says they are
deprecated in favor or sprintf().  We'll import these functions
from OpenBSD and remove __gdtoa() from the exported interfaces
when libc version is bumped.
2006-04-01 02:56:09 +00:00
jasone
996bd9246d Optimize runtime performance, primary using the following techniques:
* Avoid choosing an arena until it's certain that an arena is needed
    for allocation.

  * Convert division/multiplication to bitshifting where possible.

  * Avoid accessing TLS variables in single-threaded code.

  * Reduce the amount of pointer dereferencing.

  * Move lock acquisition in critical paths to only protect the the code
    that requires synchronization, and completely remove locking where
    possible.
2006-03-30 20:25:52 +00:00
ume
3a893e11a7 Expose res_update and friends again. At least, ports/mail/spamilter
uses them.
Now, we have res_nupdate and res_nmkupdate as well, but they are
still based on our old resolver for binary backward compatibility.
So, they don't provide new features such as TSIG support.

Reported by:	pointyhat via kris
2006-03-30 20:15:53 +00:00
trhodes
dba9e095d4 Fix a bug where, for 6-byte sequences, the top 6 bits get compared to
111111 rather than the top 7 bits being compared against 1111110 causing
illegal bytes fe and ff being treated the same as legal bytes fc and fd.
2006-03-30 09:04:12 +00:00
deischen
c52b7e783b Add __collate_load_error and __collate_range_cmp to the list of
FBSDprivate locale symbols.  These functions are needed by
libcompat.

Add _cleanup to the list of stdio FBSDprivate symbols.  Some
third party applications use this.  This will be removed and
replaced by fcloseall() once libc version is bumped.

Add _res to the list of resolv symbols.

Found by:	portbuilder runs (thanks Kris!)
2006-03-30 04:37:08 +00:00
deischen
b19d325a18 Add symbol versioning.
Reviewed by:	davidxu
2006-03-29 14:08:45 +00:00
des
590f74742c Bring libpthread up to WARNS level 2.
Reviewed by:	deischen
2006-03-29 05:38:19 +00:00
deischen
7415466d60 Account for recent changes in namespace.h. Use _pthread_create
instead of pthread_create.
2006-03-29 04:20:53 +00:00
jasone
1a854b0cf7 Add malloc_usable_size(3).
Discussed with:		arch@
2006-03-28 22:16:04 +00:00
des
91d320d3aa Fix prototype mismatch and use of un-namespaced pthread functions. 2006-03-28 21:50:12 +00:00
des
5438ed2ce6 Fix prototype mismatch. 2006-03-28 21:46:55 +00:00
deischen
776daae39d Use the correct type for and argument. Recent changes to namespace.h
exposed this bug.

Reported by:	kris
2006-03-28 21:07:59 +00:00
des
04272f39a0 Add semaphore functions, and remove some dupes from the #if 0 section. 2006-03-28 18:48:49 +00:00
des
da0340f07c Add a bunch of missing pthread functions, and move out-of-order functions. 2006-03-28 16:41:06 +00:00
ume
39501d50fa If the query choked with EDNS0, retry without EDNS0.
Obtained from:	res_nquery() of BIND9.
2006-03-28 07:42:57 +00:00
davidxu
f8168da7cf Allocate space for thread pointer, this allows thread library to access
its pointer from begin, and simplifies _get_curthread() in libthr.
2006-03-28 06:09:24 +00:00
deischen
d76f24935a Add symbol versioning to libm. 2006-03-27 23:59:45 +00:00
davidxu
255936645e Remove priority mutex code because it does not work correctly,
to make it work, turnstile like mechanism to support priority
propagating and other realtime scheduling options in kernel
should be available to userland mutex, for the moment, I just
want to make libthr be simple and efficient thread library.

Discussed with: deischen, julian
2006-03-27 23:50:21 +00:00
davidxu
4b5909711d Comment out -g compiler option, found by 'FreeBSD Build Options Survey'. 2006-03-27 05:58:58 +00:00
jasone
0ed4b6d88e Allow the 'n' option to decrease the number of arenas below the default,
to as little as one arena.  Also, limit the number of arenas to avoid a
potential invariant violation in base_alloc().
2006-03-26 23:41:35 +00:00
jasone
9b6cd0a1ee Add comments and reformat/rearrange code. There are no significant
functional changes in this commit.
2006-03-26 23:37:25 +00:00
jkoshy
48e5e4792d MFP4: Support for profiling dynamically loaded objects.
Kernel changes:

  Inform hwpmc of executable objects brought into the system by
  kldload() and mmap(), and of their removal by kldunload() and
  munmap().  A helper function linker_hwpmc_list_objects() has been
  added to "sys/kern/kern_linker.c" and is used by hwpmc to retrieve
  the list of currently loaded kernel modules.

  The unused `MAPPINGCHANGE' event has been deprecated in favour
  of separate `MAP_IN' and `MAP_OUT' events; this change reduces
  space wastage in the log.

  Bump the hwpmc's ABI version to "2.0.00".  Teach hwpmc(4) to
  handle the map change callbacks.

  Change the default per-cpu sample buffer size to hold
  32 samples (up from 16).

  Increment __FreeBSD_version.

libpmc(3) changes:

  Update libpmc(3) to deal with the new events in the log file; bring
  the pmclog(3) manual page in sync with the code.

pmcstat(8) changes:

  Introduce new options to pmcstat(8): "-r" (root fs path), "-M"
  (mapfile name), "-q"/"-v" (verbosity control).  Option "-k" now
  takes a kernel directory as its argument but will also work with
  the older invocation syntax.

  Rework string handling in pmcstat(8) to use an opaque type for
  interned strings.  Clean up ELF parsing code and add support for
  tracking dynamic object mappings reported by a v2.0.00 hwpmc(4).

  Report statistics at the end of a log conversion run depending
  on the requested verbosity level.

Reviewed by:	jhb, dds (kernel parts of an earlier patch)
Tested by:	gallatin (earlier patch)
2006-03-26 12:20:54 +00:00
davidxu
32673f0256 Check cancellation state carefully to see we really need to call
_pthread_testcancel(). Preserve errno in _thr_suspend_check().
2006-03-26 01:57:03 +00:00
ume
869b9276a7 - Use ANSI C prototype.
- Remove trailing space.
2006-03-25 11:46:37 +00:00
davidxu
2926ddf5d1 Don't cancel thread if it is in critical region. 2006-03-25 07:03:13 +00:00
davidxu
679e2338c0 Only wake up writer if the lock is free. 2006-03-25 05:14:21 +00:00
davidxu
cba4d932c1 Compile thr_rtld.c 2006-03-25 05:00:54 +00:00
davidxu
6ee36bbb6d Add locking support for rtld. 2006-03-25 04:49:07 +00:00
jasone
443b2d32bc Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), and
determine its value at run time according to other relevant values.  This
avoids the creation of runs that are incompletely utilized, as long as
pagesize isn't too large (>32kB, given the current RUN_MIN_REGS_2POW
setting).

Increase the size of several structure bitfields in arena_run_t in order
to avoid integer overflow in the case that a run's header does not overlap
with the space that is usable as application allocation regions.  Given
the tiny_min_2pow change, this fix has no additional impact unless
pagesize is >32kB.

Reported by:	kris
2006-03-24 22:13:49 +00:00
ume
bf9a791993 When res_nquerydomain() returns SERVFAIL, we should try next domain. 2006-03-24 13:30:10 +00:00
ume
6d9b77bdc9 When res_send() fails, we should reserve an error code. 2006-03-24 04:49:30 +00:00
davidxu
eb9bdb4259 set an upper limit for thread structures which can be allocated. 2006-03-24 04:34:06 +00:00
davidxu
645d4d320d Implement SIGEV_THREAD notification for aio_fsync. 2006-03-24 03:24:27 +00:00
jasone
c5cf5122a1 Add USE_BRK-specific code in malloc_init_hard() to allow the first
internally used chunk to start at the beginning of the heap, rather
than at a chunk-aligned address.  This reduces mapped memory somewhat
for 32-bit architectures.

Add the arena_run_link_t type and use it wherever a run object is only
used as a ring 'header'.  This saves approximately 40 kB of memory per
arena.

Remove an obsolete (no longer used) code path from base_alloc(), which
supported the internal allocation of objects larger than the chunk
size.

Enhance chunk_dealloc() to cache chunk addresses for all deallocated
chunks.  This has no impact for most programs, but has the potential
to reduce VM map fragmentation for programs that use huge
allocations.
2006-03-24 00:28:08 +00:00
peter
114d7f6536 Document that the documented 2GB mmap limit is actually a
documentation bug.  We switched to page indexes some time around
FreeBSD 2.2.  The actual 'len' limit is the maximum file size or what
will fit in your address space, whichever comes first.  It should be
possible to make 1TB files on 32 bit systems, but of course address space
runs out long before then.
2006-03-23 23:37:06 +00:00
des
99415d830f It's not enough to provide symbol map files; you also have to add them
to ${SYM_MAPS}.  This unbreaks world with SYMVER_ENABLED.

Pointy hat to:	ume
2006-03-23 16:55:13 +00:00
des
ec17f77885 Resolve conflicts. 2006-03-23 14:09:21 +00:00
des
6d9b0264a1 This commit was generated by cvs2svn to compensate for changes in r157043,
which included commits to RCS files with non-trunk default branches.
2006-03-23 14:02:36 +00:00
des
caf24dd709 Vendor import of ZLib 1.2.3. 2006-03-23 14:02:36 +00:00
gshapiro
37b7266a79 Add new libsm file from sendmail 8.13.6
MFC after:	4 days
2006-03-22 16:58:15 +00:00
kientzle
91783fa04a Even if a system does not support restoring extended attributes,
it's only a failure if there were actually attributes to be restored.
In particular, this fixes the problem where tar -xp always returned
a failure code on FreeBSD (which doesn't yet have all of the extended
attribute support).

Thanks to: Diego "Flameeyes" Petteno
2006-03-22 02:42:17 +00:00
ume
98c9faf4d0 We have gmtime_r(3). 2006-03-21 18:31:24 +00:00
kientzle
537ab73b2f POSIX.1e-style Extended Attribute support
This commit implements storing/reading POSIX.1e-style extended
attribute information in "pax" format archives.  An outline of the
storage format is in the tar.5 manpage.  The archive_read_extract()
function has code to restore those archives to disk for Linux; FreeBSD
implementation is forthcoming.

Many thanks to Jaakko Heinonen for finding flaws in earlier
proposals and doing the bulk of the coding in this work.
2006-03-21 16:55:46 +00:00
ume
b09a8950a1 Update the resolver in libc to BIND9's one.
Since, res_sendsigned(3) and the friends use MD5 functions, it is
hard to include them without having MD5 functions in libc.  So,
res_sendsigned(3) is not merged into libc.

Since, res_update(3) in BIND9 is not binary compatible with our
res_update(3), res_update(3) is leaved as is, except some
necessary modifications.
The res_update(3) and the friends are not essential part of the
resolver.  They are not defined in resolv.h but defined in
res_update.h separately in BIND9.  Further, they are not called from
our tree.  So, I hide them from our resolv.h, but leave them only
for binary backward compatibility (perhaps, no one calls them).

Since, struct __res_state_ext is not exposed in BIND9, I hide it
from our resolv.h.  And, global variable _res_ext is removed.  It
breaks binary backward compatibility.  But, since it is not used from
outside of our libc, I think it is safe.

Reviewed by:	arch@ (no objection)
2006-03-21 16:11:11 +00:00
ume
03859cff09 - Merge our local changes.
- Exclude unnecessary functions for us.
2006-03-21 15:37:16 +00:00
ume
bc31c32e59 Oops, remove the file I imported into wrong place. 2006-03-21 15:07:04 +00:00
ume
92fc9582cf This commit was generated by cvs2svn to compensate for changes in r156954,
which included commits to RCS files with non-trunk default branches.
2006-03-21 15:07:04 +00:00
ume
1adda4f185 Vendor import of BIND 9.3.2 2006-03-21 15:03:19 +00:00
ume
f94090a388 This commit was generated by cvs2svn to compensate for changes in r156952,
which included commits to RCS files with non-trunk default branches.
2006-03-21 15:03:19 +00:00
delphij
53d6233f74 When we are doing initialization against q, use its own size, not
the size of q2.  This should be a no-op because q and q2 are of
the same type.

Submitted by:	Alexey Dobriyan <adobriyan gmail com>
2006-03-21 12:39:29 +00:00
wkoszek
a9e9a228bd There is no need to pass NULL to the pam_error() as the last argument.
Remove it.

Reviewed by:	des
Approved by:	cognet (mentor)
2006-03-20 16:56:08 +00:00
jkoshy
9621023f82 Update the pmc(3) manual page's date string and freshen the year in the (c) line for
pmc.3 and libpmc.c.
2006-03-20 15:28:59 +00:00
ru
270427ac5b Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
jasone
8a77abffbc Separate completely full runs from runs that are merely almost full, so
that no linear searching is necessary if we resort to allocating from a
run that is known to be mostly full.  There are pathological edge cases
that could have caused severely degraded performance, and this change
fixes that.
2006-03-20 04:05:05 +00:00
davidxu
020594940d Set default contention scope to system. 2006-03-20 03:14:14 +00:00
jasone
6ab124975f Optimize realloc() to reallocate in place if the old and new sizes are
close enough to each other that reallocation would allocate a new region
of the same size.  This improves the performance of repeated incremental
reallocations by up to three orders of magnitude. [1]

Fix arena_new() to properly constrain run size if a small chunk size was
specified during runtime configuration.

Suggested by:	se [1]
2006-03-19 18:28:06 +00:00
ru
81f8a2cff8 Fix build until I find a way to handle this case properly. 2006-03-19 08:52:49 +00:00
ru
90b657b795 Revert last delta. 2006-03-19 06:14:30 +00:00
phk
5a9bbe93ee Comment out MK_PROFILE until ru@ can fix this properly 2006-03-19 04:49:11 +00:00
ru
5f8b6d3c5a Convert NO_PROFILE and NO_LIB32 to new style. 2006-03-18 21:37:05 +00:00
ru
17d5388342 Provide alternate default for SHLIBDIR before bsd.own.mk does this.
Reported by:	phk
2006-03-18 11:01:06 +00:00
ru
388e590f95 Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
jasone
1759b378e2 Modify allocation policy, in order to avoid excessive fragmentation for
allocation patterns that involve a relatively even mixture of many
different size classes.

Reduce the chunk size from 16 MB to 2 MB.  Since chunks are now carved up
using an address-ordered first best fit policy, VM map fragmentation is
much less likely, which makes smaller chunks not as much of a risk.  This
reduces the virtual memory size of most applications.

Remove redzones, since program buffer overruns are no longer as likely to
corrupt malloc data structures.

Remove the C MALLOC_OPTIONS flag, and add H and S.
2006-03-17 09:00:27 +00:00
ru
38ea5a1166 NO_MAN is not needed here. 2006-03-16 15:18:17 +00:00
deischen
1b17c00bde Suuply the name of the version map and let bsd.lib.mk supply
the link arguments.
2006-03-16 15:17:47 +00:00
deischen
cb9cc95c77 Allow bsd.lib.mk to generate the symbol version map. 2006-03-16 15:16:23 +00:00
ru
f93dac5b2f Fix comment. 2006-03-16 14:27:17 +00:00
ru
5aca7016bd Desupport the undocumented NO_QUAD option, just don't compile
the quad support on 64-bit platforms.
2006-03-16 14:22:19 +00:00
ru
2ecb5d65a2 Add a non-optional newline after ".Bx". 2006-03-15 14:45:45 +00:00
andre
b4a7a96527 Revert previous changes as we do support the .Ox macro for OpenBSD.
Pointed out by:	ceri, ru, delphij
2006-03-15 14:05:41 +00:00
ru
a11e502d44 No need to define NO_MAN here. 2006-03-15 10:41:58 +00:00
ache
93d3ecbce2 POSIXed strtoll() (and ours one too) can set errno to EINVAL, so check
it first.

Approved by:    andre
2006-03-14 19:53:03 +00:00
andre
957057f0c8 Fix HISTORY and point to OpenBSD. 2006-03-14 17:01:21 +00:00
andre
9ec6603878 Import of OpenBSD's strtonum(3) which is a nicer version of strtoll(3)
providing proper error checking and other improvements.

Obtained from:	OpenBSD
Requested by:	flz (to port Open[BGP|OSPF]D)
MFC after:	3 days
2006-03-14 16:57:30 +00:00
deischen
bb2532ee37 ns_name_skip was recently redefined to __ns_name_skip
like the others in <include/arpa/nameser.h>.

Submitted by:	ume
2006-03-13 04:49:40 +00:00
deischen
bd9aeda0be Make _spinunlock() point to the spinunlock stub, not the
spinlock stub.
2006-03-13 01:17:39 +00:00
deischen
a0f6b0f1d0 Add each directory's symbol map file to SYM_MAPS. 2006-03-13 01:15:01 +00:00
deischen
cc69a08fbf Add compatibility symbol maps. libpthread (.so.1 and .so.2)
used LIBTHREAD_1_0 as its version definition, but now needs
to define its symbols in the same namespace used by libc.
The compatibility hooks allows you to use libraries and
binaries built and linked to libpthread before libc was
built with symbol versioning.  The shims can be removed if
libpthread is given a version bump.

Reviewed by:	davidxu
2006-03-13 00:59:51 +00:00
deischen
2de255c506 Add hooks to build libc with symbol versioning. This is
disabled by default; add SYMVER_ENABLED=true to /etc/make.conf
to enable it.  libc should get a version bump before this is
enabled by default.

Reviewed by:	davidxu
2006-03-13 00:56:02 +00:00
deischen
138dd54357 Add symbol maps and initial symbol version definitions to libc.
Reviewed by:	davidxu
2006-03-13 00:53:21 +00:00
kientzle
9d4fb3fc1c Remove automake source from FreeBSD tree. 2006-03-12 19:54:34 +00:00
kientzle
f562a56c78 The idea of supporting 'tp' was a fun one, but it is
really not worth the effort to develop and maintain
support for a format that hasn't been used for 30 years. ;-/
2006-03-11 23:59:44 +00:00
davidxu
40ba85224c Add entries for new pthread stubs. 2006-03-10 09:58:18 +00:00
davidxu
45ada7f2f2 Block all signals in helper threads except those should not be blocked. 2006-03-10 08:01:23 +00:00
jkim
7e4fc3b8f9 Implement printf 'X' conversion for both libstand and kernel. 2006-03-09 22:37:34 +00:00
davidxu
8f18db02db Connect librt to buildworld. 2006-03-09 01:03:58 +00:00
davidxu
d119bdaa7a Remove mqueue and timer, now they are in librt. 2006-03-08 23:47:04 +00:00
davidxu
b33c92af90 Remove mq.c, the POSIX mqueue is implemented in librt.
Suggested by: deischen
2006-03-08 23:42:41 +00:00
kientzle
101c7b294b Remove configure.ac.in and reorganize a few other things. This is
part of a program to remove the non-FreeBSD autoconf/automake build
system for libarchive from the FreeBSD source tree.
2006-03-08 01:56:06 +00:00
davidxu
e99490121b Set SNF_SYNC flag for timer, as the timer notification should be
serialized.
2006-03-08 00:34:54 +00:00
davidxu
d77810c249 Remove stale comments. 2006-03-07 08:42:02 +00:00
davidxu
13fd270405 1. Always call user callback function in newly created thread, it seems
POSIX implies that the user callback function must be executed in clean
environment.
2. Use newly introduced pthread stubs in libc.
2006-03-07 08:28:07 +00:00
yar
7ba58b694e Add appropriate xrefs.
MFC after:	3 days
2006-03-06 13:15:12 +00:00
yar
f4b4b54f2b Since the whole login.access feature has moved to PAM,
login.access.5 will be installed from the respective PAM
module's src directory.

MFC after:	3 days
2006-03-06 12:31:25 +00:00
yar
4995e053c3 Sync with src/usr.bin/login/login.access.5.
src/usr.bin/login/login.access.5 should be removed from use
because the whole login.access feature has moved to this PAM
module.

MFC after:	3 days
2006-03-06 12:26:43 +00:00
deischen
6401ef60bd Only catch SIGINFO (for dumping thread states) when LIBPTHREAD_DEBUG
is defined in the environment.

Requested by:	jmg & a few others
2006-03-06 05:02:28 +00:00
deischen
e586a0042e Add some more pthread stubs so that librt can use them.
The thread jump table has been resorted, so you need to
keep libc, libpthread, and libthr in sync.

Submitted by:	xu
2006-03-05 18:10:28 +00:00
brueffer
6db6365c65 Remove a useless word.
PR:		94087
Submitted by:	Tadaaki Nagao <nagao@iij.ad.jp>
MFC after:	3 days
2006-03-05 10:32:15 +00:00
keramida
4465edc46a Use intmax_t' instead of plain int' for pid_t casts.
Useful tips from:	ru, bde
Approved by:		pjd
MFC after:		3 days
2006-03-04 15:20:28 +00:00
davidxu
8e36ba772a Use a thread pool to process notification if sigev_notify_attributes
is default and caller does not require dedicated thread. timer needs
a dedicated thread to maintain overrun count correctly in notification
context. mqueue and aio can use thread pool to do notification
concurrently, the thread pool has lifecycle control, some threads will
exit if they have idled for a while.
2006-03-04 00:18:19 +00:00
davidxu
869493f015 save sigev_node pointer. 2006-03-04 00:08:24 +00:00
jcamou
44dc71d01c Sync with actual code.
PR:		docs/87681
Noticed by:	Andreas Kohn <andreas@syndrom23.de>
Reviewed by:	brooks
Approved by:	trhodes (mentor)
MFC after:	3 days
2006-03-03 13:58:43 +00:00
phk
0ef226b65a Fix the %Q printf extension to behave as expected 2006-03-02 08:53:45 +00:00
davidxu
a8886a11b7 1. Fix a race in aio_return.
2. Save and restore syscall errno correctly.
3. Style fix.
2006-03-01 23:41:47 +00:00
davidxu
5d292c8fb4 Style fix. 2006-03-01 23:40:00 +00:00
davidxu
c468432d46 Fix a mutex lock/unlock mismatch. 2006-03-01 23:38:53 +00:00
ume
5e1521cce3 Handle the errors returned by res_querydomain() in same manner.
Reported by:	yar
Tested by:	yar, Rostislav Krasny <rosti.bsd__at__gmail.com>
MFC after:	1 week
2006-03-01 15:53:49 +00:00
davidxu
8ddf0913dd Forgot to revert to use weak symbols when I was debugging, fix it! 2006-03-01 08:50:36 +00:00
davidxu
c652436886 Add missing parameter mq_attr * for mq_open. 2006-03-01 08:06:09 +00:00
davidxu
22fb15cfe9 Bring in my initial version of POSIX realtime extension library.
Current the library implements mqueue, timer and aio with SIGEV_THREAD
notification supported.

Earlier version reviewed by: deischen
2006-03-01 06:37:34 +00:00
davidxu
f29e4c0c75 Disconnect mqueue from buildworld, as I will implement it in seperated
library.
2006-03-01 06:25:46 +00:00
deischen
b028e2897b Const'ify arguments to a couple of functions to fix breakage
with -O2.
2006-02-28 16:02:26 +00:00
delphij
3acbd90cd9 Don't do a time travel to 12006... 2006-02-28 07:36:25 +00:00
davidxu
6fdf2b7d81 Reimplement mutex_init to get rid of compile warning. 2006-02-28 06:06:19 +00:00
deischen
97af573880 Staticize a couple of functions.
Remove a few unused locks.

Remove locks from application namespace.
2006-02-27 22:10:59 +00:00
deischen
2a2559a103 Correct a comment.
Staticize two tables thare are not visible in <resolv.h>
and which are also local in Solaris' libresolv.

Remove two functions that are not referenced in libc nor
anywhere else I can find, not visible in <resolv.h> and
which are also local in Solaris libresolv.
2006-02-27 22:08:16 +00:00
wkoszek
1796fdb900 Fix typo in manual page reference.
Approved by:	cognet (mentor)
MFC after:	3 days
2006-02-26 23:01:11 +00:00
ume
a8acef0bfb Sync inet_net_pton() and inet_net_ntop() with latest BIND9's includes
an IPv6 support.

PR:		kern/93740
Submitted by:	Rudolf Cejka <cejkar__at__fit.vutbr.cz>
Obtained from:	BIND9
MFC after:	1 week
2006-02-26 05:44:21 +00:00
jkoshy
62ed249b1e Add an alias 'unhalted-cycles' denoting cycles where the CPU is
not in a halt or sleep state.
2006-02-25 05:34:00 +00:00
deischen
2c3357a0a6 Fix a race condition introduced when redzones were added. Use an
atomic operation to return and adjust the stack.

Submitted by:	luoqi
2006-02-24 22:03:10 +00:00
ume
d095cafa05 - Just query 'as is', if there is a trailing dot in the name.
- Don't query 'as is' twice.

PR:		bin/62139
Reported by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
Tested by:	Rostislav Krasny <rosti.bsd__at__gmail.com>
Obtained from:	BIND9 (with some modification)
MFC after:	1 week
2006-02-24 16:53:42 +00:00
deischen
4dd473489e Eliminate a race condition in timed waits (cv, mutex, and sleeps).
MFC Candidate.

PR:	93592
2006-02-23 21:34:08 +00:00
yar
d3fcb2cf25 Tell the truth about a) how to get the first fileid, and
b) what return values from kldstat(2) can be expected.

Bump .Dd.

MFC after:	3 days
2006-02-22 15:11:12 +00:00