summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Stop enforcing dependencies between MK_* options at Makefile level.yar2006-07-311-1/+2
| | | | All the dependencies are satisfied now in <bsd.own.mk>.
* Pass BN_CTX to internal functions instead of allocating it internally.simon2006-07-301-27/+35
| | | | | | This allows msqrt() to only call BN_CTX_new() once intead of many times. Suggested and reviewed by: stefanf
* Conditionally include sys/mkdev.h on platforms (such as Solaris) that need it.kientzle2006-07-301-0/+3
| | | | Thanks to: VMiklos
* Use 'skip' when ignoring data in tar archives. This dramaticallykientzle2006-07-3011-11/+287
| | | | | | | | | | | | | | | | | | | | increases performance when extracting a single entry from a large uncompressed archive, especially on slow devices such as USB hard drives. Requires a number of changes: * New archive_read_open2() supports a 'skip' client function * Old archive_read_open() is implemented as a wrapper now, to continue supporting the old API/ABI. * _read_open_fd and _read_open_file sprout new 'skip' functions. * compression layer gets a new 'skip' operation. * compression_none passes skip requests through to client. * compression_{gzip,bzip2,compress} simply ignore skip requests. Thanks to: Benjamin Lutz, who designed and implemented the whole thing. I'm just committing it. ;-) TODO: Need to update the documentation a little bit.
* Don't mention 'pax' in the context of POSIX-1988, sincekientzle2006-07-291-5/+4
| | | | | | | | | pax wasn't introduced until the 1993 (?) revision. (I need to double-check when pax was introduced and clarify some of the history here. In particular, I should explain that the 'pax' standard now owns the 'ustar' format spec.)
* Remove mention of 'tp' format, since that support has beenkientzle2006-07-291-10/+0
| | | | | removed. (It was introduced experimentally and I have simply never had time to finish it.)
* Do not put BN_CTX structures on the stack, but instead allocate themsimon2006-07-281-25/+36
| | | | | | | | | | | | runtime using BN_CTX_new(). This is done since in OpenSSL 0.9.7e we can only allocate BN_CTX on the stack by including an internal OpenSSL header file, and in OpenSSL 0.9.8 BN_CTX is entirely opaque, so having it on the stack is not possible at all. This is done as preparation for OpenSSL 0.9.8b import. Tested on: amd64 i386 ia64 Tested with: src/tools/regression/lib/libmp
* Remove debug code.stefanf2006-07-283-12/+0
| | | | Suggested by: des
* Conditionally expand the size_invs lookup table in arena_run_reg_dalloc()jasone2006-07-271-1/+12
| | | | | | | | so that architectures with a quantum of 8 (rather than 16) work. Restore arm's quantum to 8. Submitted by: jmg
* Use 4 as QUANTUM_2POW_MIN on arm as it is on any other architecture, to avoidcognet2006-07-271-1/+1
| | | | triggering an assertion later.
* style.Makefile(5) is good for our eyes.yar2006-07-271-4/+8
|
* Respect MK_INET6_SUPPORT.yar2006-07-272-2/+10
|
* Fix cpp logic in arena_malloc() to adjust size when assertions are enabled,jasone2006-07-271-23/+19
| | | | | | | | even if stats gathering is disabled. [1] Remove 'size' parameter from several functions that do not use it. Reported by: [1] ache
* Remove stale comment about armimp2006-07-261-2/+0
|
* Respect MK_INET6_SUPPORT.yar2006-07-261-1/+5
|
* Fix build w/o INET6.yar2006-07-261-0/+2
| | | | Submitted by: Andre Albsmeier <Andre.Albsmeier siemens com>
* Increase the number of CPUs to 32 to suit sun4v.jb2006-07-261-1/+1
| | | | Reviewed by: rwatson@
* Rev. 1.44 of this file didn't introduce a right solution,yar2006-07-251-0/+7
| | | | | | | but we don't seem to have one yet, so just add an XXX comment on passing rux_runtime to bintime2timeval() wrongly. Spotted by: gcc(1) (warning)
* 1. Don't override underscore version of aio_suspend(), system(),davidxu2006-07-254-100/+191
| | | | | | | | | | wait(), waitpid() and usleep(), they are internal versions and should not be cancellation points. 2. Make wait3() as a cancellation point. 3. Move raise() and pause() into file thr_sig.c. 4. Add functions _sigsuspend, _sigwait, _sigtimedwait and _sigwaitinfo, remove SIGCANCEL bit in wait-set for those functions, the signal is used internally to implement thread cancellation.
* Add missing ;.nork2006-07-231-1/+1
| | | | | Pointy hat to: myself Approved by: deischen (implicitly)
* do not overload the port number on to the return value ofume2006-07-231-8/+9
| | | | | | | str2number(). this could result in an unexpected code path. Obtained from: KAME MFC after: 1 week
* Add missing syscalls.nork2006-07-231-0/+12
| | | | | Reviewed by: deischen Approved by: deischen
* stop use of mutex lock in ICMP lookup.ume2006-07-231-18/+5
| | | | MFC after: 1 week
* remove obsolete comments.ume2006-07-221-8/+0
| | | | MFC after: 3 days
* simplification in explore_numeric: unified the post-process withume2006-07-211-32/+22
| | | | | | | GET_AI and GET_PORT. Commented on an impossible case. Obtained from: KAME MFC after: 1 week
* RFC3493 requires use of inet_aton for AF_INET.ume2006-07-211-3/+7
| | | | | Obtained from: KAME MFC after: 1 week
* clean-up: rewrote explore_null and explore_numeric without using sentinel.ume2006-07-211-35/+20
| | | | | | | | we do not need it since we make (at most) a single addrinfo entry in these cases. Obtained from: KAME MFC after: 1 week
* - draft-ietf-ipngwg-icmp-namelookups-09ume2006-07-211-79/+164
| | | | | | | | | - make it compilable It still requires root privilege and is experimental. Obtained from: KAME MFC after: 1 week
* Use variadic macros that comply with C99. Keep the GCC-style ones ifstefanf2006-07-171-1/+1
| | | | DEBUG is defined and GCC is used.
* Change the GCC specific __FUNCTION__ to C99's __func__.stefanf2006-07-171-1/+1
| | | | OK'ed by: des
* Make the variadic macro debug() comply to C99.stefanf2006-07-171-3/+6
|
* Use a prototype for res_init().stefanf2006-07-171-1/+1
| | | | MFC after: 3 days
* Unexpand two TAILQ_FOREACH_SAFE cases.delphij2006-07-172-4/+2
| | | | Ok'ed by: davidxu
* Note the convention that humanize_number follows.imp2006-07-151-8/+11
| | | | Add 'engineering' numbers to table.
* o compat_group() and files_group() are more complicated than I thoughtmaxim2006-07-141-4/+6
| | | | | | | | | | | | | | | | 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
* Caching scheduling policy and priority in userland, a critical but baddlydavidxu2006-07-135-20/+50
| | | | | written application is frequently changing thread priority for SCHED_OTHER policy.
* Use thr_setscheduler, thr_getscheduler and thr_setschedparam to implementdavidxu2006-07-134-26/+15
| | | | pthread functions.
* o Add missed comma, xref kld(4).maxim2006-07-121-2/+3
|
* Use kernel facilities to support real-time scheduling.davidxu2006-07-127-124/+103
|
* __error could be called too early before libthr is initialized, testdavidxu2006-07-121-5/+7
| | | | this case and return global varible errno instead.
* Following repo-copy of mac_is_present_np.3 to mac_is_present.3, removerwatson2006-07-076-93/+6
| | | | | | | old file, update references, etc. The C function is already named mac_is_present(). Obtained from: TrustedBSD Project
* Fixed the threshold for using the simple Taylor approximation.bde2006-07-072-2/+2
| | | | | | | | | | | | | | | | | | | | | 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.)
* Fixed tanh(-0.0) on ia64 and optimizeed tanh(x) for 2**-55 <= |x| <bde2006-07-051-10/+10
| | | | | | | | | | | | | | | | | | | 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).
* Removed the optimized asm versions of scalb() and scalbf(). Thesebde2006-07-053-62/+2
| | | | | | | | | | | | | | | | | | | | | | | | | 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.)
* Backed out rev.1.10. It tried to implement ldexpf() as a weak referencebde2006-07-051-2/+0
| | | | | | | | | | | | | | | | | 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.
* Use some math tricks in arena_run_reg_dalloc() to avoid actual division, asjasone2006-07-011-83/+90
| | | | | | | | | | | | | | | | | 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
* Make the behavior of malloc(0) standards-compliant by getting rid of nil,jasone2006-06-301-48/+46
| | | | | | | | | 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.
* twalk() expects an `action' function not a comparison function.keramida2006-06-231-1/+1
| | | | | | | | | 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
* Remove some unused variablesbrian2006-06-231-2/+0
|
* Make the mincore(2) return ENOMEM when requested range is not fully mapped.kib2006-06-211-2/+2
| | | | | | | Requested by: Bruno Haible <bruno at clisp org> Reviewed by: alc Approved by: pjd (mentor) MFC after: 1 month
OpenPOWER on IntegriCloud