summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Small style(9) cleanups.ed2010-03-135-10/+13
|
* Make this conform to the other top-level Makefile subdir listings withimp2010-03-131-13/+77
| | | | | | one file per line. Suggested by: bde
* Fix spelling of noreorder.jmallett2010-03-131-1/+1
|
* Correct bugs fixed but not merged from my own tree.delphij2010-03-131-2/+3
| | | | | Pointy hat to: delphij MFC after: 1 month
* Follow up commit to reindent the code.delphij2010-03-121-13/+13
| | | | MFC after: 1 month
* Two optimizations to MI strlen(3) inspired by David S. Miller'sdelphij2010-03-121-12/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | blog posting [1]. - Use word-sized test for unaligned pointer before working the hard way. Memory page boundary is always integral multiple of a word alignment boundary. Therefore, if we can access memory referenced by pointer p, then (p & ~word mask) must be also accessible. - Better utilization of multi-issue processor's ability of concurrency. The previous implementation utilized a formular that must be executed sequentially. However, the ~, & and - operations can actually be caculated at the same time when the operand were different and unrelated. The original Hacker's Delight formular also offered consistent performance regardless whether the input would contain characters with their highest-bit set, as it catches real nul characters only. These two optimizations has shown further improvements over the previous implementation on microbenchmarks on i386 and amd64 CPU including Pentium 4, Core Duo 2 and i7. [1] http://vger.kernel.org/~davem/cgi-bin/blog.cgi/2010/03/08#strlen_1 MFC after: 1 month
* Fix several typos in macros or macro misusage.uqs2010-03-126-3/+6
| | | | | | Found by: make manlint Reviewed by: ru Approved by: philip (mentor)
* - Use an initializer macro to initialize fields in 'fake' FILE objects usedjhb2010-03-1112-39/+22
| | | | | | | | | | | | by *sprintf(), etc. - Explicitly initialize _fl_mutex to PTHREAD_MUTEX_INITIALIZER for all FILE objects. This is currently a nop on FreeBSD, but is import for other platforms (or in the future) where PTHREAD_MUTEX_INITIALIZER is not simply zero. PR: threads/141198 Reported by: Jeremy Huddleston @ Apple MFC after: 2 weeks
* Fix a bug in the previous change: remove function-local definition ofjhb2010-03-111-1/+0
| | | | | | | tcp_key and udp_key that shadows the global definition. PR: threads/144558 Submitted by: Sam Robb
* Fix a typo in r204974 so that FTYPE_LNG matches the initialisers ofmarius2010-03-111-1/+1
| | | | | | the opmask array. Pointed out by: Peter Jeremy
* - The OPSZ macro actually only does the right thing for int32 and int64marius2010-03-102-29/+21
| | | | | | | | | | | | | | | | | operands but not for double and extended double ones. Instead of trying to fix the macro just nuke it and unroll the loops in the correct way though as extended double operands turn out to be the only special case. - For FxTO{s,d,q} the source operand is int64 so rs2 has to be re-decoded after setting type accordingly as it's generally decoded using the low 2 bits as the type, which are 0 for these three instructions. - Similarly, in case of F{s,d,q}TOx the target is int64 so rd has to be re-decoded using not only the operand mask appropriate for int64 but also the correct register number encoding. - Use const where appropriate. - Wrap long lines. Submitted by: Peter Jeremy (partly) MFC after: 3 days
* Use thr_once() with once_t controls to initialize various thread_key_tjhb2010-03-108-64/+81
| | | | | | | | | | | | objects used to provide per-thread storage in the RPC code. Almost all of these used double-checking with a dedicated mutex (tsd_lock) to do this before. However, that is not always safe with more relaxed memory orders. There were also other bugs, such as one in __rpc_createrr() that caused a new key to be allocated each time __rpc_createrr() was invoked. PR: threads/144558 Reported by: Sam Robb samrobb of averesystems com (key leak) MFC after: 1 week
* Add warnings to <regexp.h> and <sys/timeb.h>.ed2010-03-091-1/+1
| | | | | | | | | These header files only provide functionality that can be used in combination with libcompat. In order to prevent people from including them without any actual use (which happens a lot with <sys/timeb.h>), put a warning here to make people more aware. This means we have to lower WARNS for libcompat, which is no big deal.
* Upgrade to OpenSSH 5.4p1.des2010-03-091-0/+3
|\ | | | | | | MFC after: 1 month
| * When I flattened the dist tree, some files that had been removed in priordes2008-09-011-35/+0
| | | | | | | | vendor imports were inadvertantly resurrected. Re-remove them.
| * Properly flatten openssh/dist.des2008-07-221-0/+35
|
* Switch to our preferred license text.joel2010-03-071-8/+8
| | | | Approved by: jedgar
* Use default WARNS setting (of 6) for lib/csu.uqs2010-03-056-15/+7
| | | | | | PR: bin/140089 Reviewed by: jmallett Approved by: ed (co-mentor)
* Properly declare non-extern functions in crt1uqs2010-03-055-5/+13
| | | | | | | | Also move the declarations after __progname consistently to make the distinction clearer. Reviewed by: jmallett Approved by: ed (co-mentor)
* Remove stale references to libkrb5.imp2010-03-041-11/+12
| | | | | | | | Rejigger the SUBDIR setting a smidge: we now set all the libraries that depend on something else, and then SUBDIR+= the rest. A separate commit will fix the SUBDIR style to be the same as the rest of the tree.
* Use our standard license text. No more voices in the authors head. :-)joel2010-03-049-72/+72
| | | | Approved by: trasz
* Enable the use of nanosleep() instead of using pause() and signals.gshapiro2010-03-041-0/+1
| | | | | | | | This Makefile change can be removed when the next version of sendmail is imported as it will have this built in to the FreeBSD conf.h section. Submitted by: John Marshall MFC after: 3 days
* Use ABI neutral macrosaimp2010-03-032-29/+51
| | | | Submitted by: jmallet
* __main and __gccmain are no longer required, so eliminate them.imp2010-03-031-3/+0
| | | | Submitted by: jmallet@
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-031-7/+0
| | | | | | their software. Obtained from: NetBSD
* In reallocf(3), free the memory only when size != 0. Otherwise, when thejh2010-03-031-1/+8
| | | | | | | | System V compatibility option (malloc "V" flag) is in effect a zero sized reallocf() could cause a double free. PR: bin/141753 Submitted by: Dan Lukes
* Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.gnn2010-03-032-2/+475
| | | | | | | | Add macros for properly accessing coprocessor 0 registers that support performance counters. Reviewed by: jkoshy rpaulo fabien imp MFC after: 1 month
* Upgrade to version 9.6.2. This version includes all previously releaseddougb2010-03-031-4/+6
| | | | | | | | | | | | security patches to the 9.6.1 version, as well as many other bug fixes. This version also incorporates a different fix for the problem we had patched in contrib/bind9/bin/dig/dighost.c, so that file is now back to being the same as the vendor version. Due to the fact that the DNSSEC algorithm that will be used to sign the root zone is only included in this version and in 9.7.x those who wish to do validation MUST upgrade to one of these prior to July 2010.
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-024-28/+0
| | | | | | their software. Obtained from: NetBSD
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-025-35/+0
| | | | | | their software. Obtained from: NetBSD
* Remove redundant WARNS?=6 overrides and inherit the WARNS setting fromuqs2010-03-025-3/+5
| | | | | | | | the toplevel directory. This does not change any WARNS level and survives a make universe. Approved by: ed (co-mentor)
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-026-42/+0
| | | | | | their software. Obtained from: NetBSD
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-021-7/+0
| | | | | | their software. Obtained from: NetBSD
* Always assign WARNS using ?=uqs2010-03-023-6/+5
| | | | | | | - fix some nearby style bugs - include Makefile.inc where it makes sense and reduces duplication Approved by: ed (co-mentor)
* The NetBSD Foundation has granted permission to remove clause 3 and 4 fromjoel2010-03-023-9/+0
| | | | | | their software. Obtained from: NetBSD
* Not all programs including kvm.h include the necessary headers to userwatson2010-03-011-1/+1
| | | | | | | u_int, so prefer unsigned int. MFC after: 6 days Pointed out by: bz, kib, Mr Tinderbox
* A first cut at teaching libkvm how to deal with dynamic per-CPU storagerwatson2010-03-016-7/+210
| | | | | | | | | | | | | | | | | (DPCPU): A new API, kvm_dpcpu_setcpu(3), selects the active CPU for the purposes of DPCPU. Calls to kvm_nlist(3) will automatically translate DPCPU symbols and return a pointer to the current CPU's version of the data. Consumers needing to read the same symbol on several CPUs will invoke a series of setcpu/nlist calls, one per CPU of interest. This addition makes it possible for tools like netstat(1) to query the values of DPCPU variables during crashdump analysis, and is based on similar code handling virtualized global variables. MFC after: 1 week Sponsored by: Juniper Networks, Inc.
* Rewrite red-black trees to do lazy balance fixup. This improvesjasone2010-02-282-772/+837
| | | | insert/remove speed by ~30%.
* In _gettemp(), check that the length of the path doesn't exceedjh2010-02-281-0/+4
| | | | | | | | MAXPATHLEN. Otherwise the path name (or part of it) may not fit to carrybuf causing a buffer overflow. PR: bin/140228 Suggested by: jilles
* Fix typo in comment.rwatson2010-02-271-2/+2
| | | | MFC after: 3 days
* Split the contributed code from libc/stdtime from lib/libc/stdtimeedwin2010-02-2610-3621/+5
| | | | to contrib/tzcode/stdtime.
* Removed redundant -I. from CFLAGS and "yes" from WITHOUT_MAN.ru2010-02-252-4/+4
|
* Fixed dependencies (make checkdpadd).ru2010-02-251-1/+2
|
* Make pause(3) implementation not depended on the legacy sigcompat.ckib2010-02-251-1/+7
| | | | | | | interfaces. Do not block rt signals during and after pause(3) calls. Use private libc namespace to call proper methods. MFC after: 1 week
* While there, trim some trailing whitespace.ed2010-02-211-1/+0
|
* Add proper const keywords to sysctl(3) parameters.ed2010-02-214-25/+15
| | | | | | | | | | | | | The `name' and `newp' arguments can be marked const, because the buffers they refer to are never changed. While there, perform some other cleanups: - Remove K&R from sysctl.c. - Implement sysctlbyname() using sysctlnametomib() to prevent duplication of an undocumented kernel interface. - Fix some whitespace nits. It seems the prototypes are now in sync with NetBSD as well.
* Fix common misspelling of hierarchyuqs2010-02-201-2/+2
| | | | | Pointed out by: bf1783 at gmail Approved by: np (cxgb), kientzle (tar, etc.), philip (mentor)
* - More style(9) fixupsgabor2010-02-201-26/+29
| | | | Approved by: delphij (mentor)
* realloc() with a proper amount of memory.ru2010-02-171-1/+1
| | | | MFC after: 3 days
* Mention EISDIR as a possible errno.phk2010-02-171-0/+2
|
OpenPOWER on IntegriCloud