summaryrefslogtreecommitdiff
path: root/lib/libc/db/mpool/mpool.c
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* Renumber copyright clause 4Warner Losh2017-02-281-1/+1
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Update SCCS IDs for Berkeley DB 1.86 merge.Xin LI2009-06-241-1/+1
| | | | Notes: svn path=/head/; revision=194804
* Add some casts to silence compiler warning about signedness.Xin LI2009-03-281-2/+2
| | | | Notes: svn path=/head/; revision=190500
* Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.Xin LI2009-03-281-22/+76
| | | | | | | | | | | | | This does not include the new hash routines since they will cause problems when reading old hash files. Since mpool(3) has been changed, provide a compatibility shim for older binaries. Obtained from: OpenBSD Notes: svn path=/head/; revision=190498
* When allocating memory, zero out them if we don't intend to overwrite themXin LI2009-03-281-4/+1
| | | | | | | | | | | | | | | all; before freeing memory, zero out them before we release it as free heap. This will eliminate some potential information leak issue. While there, remove the PURIFY option. There is a slight difference between the new behavior and the old -DPURIFY behavior, with the latter initializes memory with 0xff's. The difference between old and new approach does not generate observable difference. Obtained from: OpenBSD (partly). Notes: svn path=/head/; revision=190482
* use more proper format string.Xin LI2009-03-231-2/+2
| | | | | | | Obtained from: NetBSD via OpenBSD Notes: svn path=/head/; revision=190342
* Diff reduction against OpenBSD: ANSI'fy prototypes.Xin LI2009-03-021-31/+15
| | | | | | | | | | | (This is part of a larger changeset which is intended to reduce diff only, thus some prototypes were left intact since they will be changed in the future). Verified with: md5(1) Notes: svn path=/head/; revision=189291
* Per Regents of the University of Calfornia letter, remove advertisingWarner Losh2007-01-091-4/+0
| | | | | | | | | clause. # If I've done so improperly on a file, please let me know. Notes: svn path=/head/; revision=165903
* Fix format strings to unbreak with -DDEBUG option.Jun Kuriyama2004-09-101-2/+2
| | | | Notes: svn path=/head/; revision=135024
* Simplify mpool_get() and mpool_write() by using pread() and pwrite()David Schultz2004-01-201-6/+3
| | | | | | | | | | instead of lseek()/_read() and lseek()/_write(). PR: bin/54276 Submitted by: <dnelson@allantgroup.com> Notes: svn path=/head/; revision=124735
* Fix the style of the SCM ID's.David E. O'Brien2002-03-221-2/+2
| | | | | | | I believe have made all of libc .c's as consistent as possible. Notes: svn path=/head/; revision=92986
* Remove __P() usage.David E. O'Brien2002-03-211-5/+5
| | | | Notes: svn path=/head/; revision=92905
* Remove _THREAD_SAFE and make libc thread-safe by default byDaniel Eischen2001-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch Notes: svn path=/head/; revision=71579
* Fix a tailq conversion bug that resulted in, e.g., nvi crashing uponBrian Feldman2000-12-301-1/+2
| | | | | | | | | | | | | | | quitting every time. The way to free a CIRCLEQ was to loop until the current == current->head, but the way to free a TAILQ is to loop until current->head == NULL. In any case, the CORRECT way to do it is a loop of TAILQ_EMPTY() checks and TAILQ_REMOVE()al of TAILQ_FIRST(). This bug wouldn't have happened if the loop wasn't hard-coded... There may be more bugs of this type from the conversion. Notes: svn path=/head/; revision=70512
* Use TAILQ instead of CIRCLEQ.Poul-Henning Kamp2000-12-291-21/+18
| | | | Notes: svn path=/head/; revision=70492
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),Jason Evans2000-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen Notes: svn path=/head/; revision=56698
* Add three-tier symbol naming in support of POSIX thread cancellationJason Evans2000-01-121-3/+5
| | | | | | | | | points. For library functions, the pattern is __sleep() <-- _libc_sleep() <-- sleep(). The arrows represent weak aliases. For system calls, the pattern is _read() <-- _libc_read() <-- read(). Notes: svn path=/head/; revision=55837
* Fix conflicts and merge into mainlinePaul Traina1996-02-271-252/+181
| | | | Notes: svn path=/head/; revision=14287
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-7/+7
| | | | Notes: svn path=/head/; revision=8870
* BSD 4.4 Lite Lib SourcesRodney W. Grimes1994-05-271-0/+534
Notes: svn path=/cvs2svn/branches/unlabeled-1.1.1/; revision=1573