summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Revert addtion of assertions in revision 1.99. These assertions causejasone2006-01-191-7/+0
| | | | | | problems in cases where regions are faked up for the purposes of red-black tree searches, since those faked region headers reside on the stack, rather than in a malloc chunk.
* Add assertions that detect some forms of region separator corruption.jasone2006-01-191-0/+7
|
* Remove loops in arena_coalesce(). They are no longer necessary, now thatjasone2006-01-191-4/+5
| | | | | internal allocation does not rely on recursive arena use (base_arena was removed in revision 1.95).
* Make all internal variables and functions static.jasone2006-01-191-12/+15
| | | | Reported by: ache
* Return NULL if there is an OOM error during initialization, rather thanjasone2006-01-191-35/+50
| | | | | | | | allowing the error to be fatal. Move a label in order to make sure to properly handle errors in malloc(0). Reported by: Alastair D'Silva, Saneto Takanori
* Add a separate simple internal base allocator and remove base_arena, so thatjasone2006-01-161-151/+175
| | | | | | | | | | there is never any need to recursively call the main allocation functions. Remove recursive spinlock support, since it is no longer needed. Allow chunks to be as small as the page size. Correctly propagate OOM errors from arena_new().
* Define NO_TLS on ia64. The dynamic TLS implementation on ia64 ismarcel2006-01-161-0/+1
| | | | | | | | | broken for non-threaded shared processes in that __tls_get_addr() assumes the thread pointer is always initialized. This is not the case. When arenas_map is referenced in choose_arena() and it is defined as a thread-local variable, it will result in a SIGSEGV. PR: ia64/91846 (describes the TLS/ia64 bug).
* Replace malloc(), calloc(), posix_memalign(), realloc(), and free() withjasone2006-01-132-1107/+4597
| | | | | | | a scalable concurrent allocator implementation. Reviewed by: current@ Approved by: phk, markm (mentor)
* Fix a bitwise logic error in posix_memalign().jasone2006-01-121-2/+2
| | | | Reported by: glebius
* Use posix_memalign() in valloc() rather than making assumptions aboutjasone2006-01-122-20/+20
| | | | | | the alignment of malloc()ed memory. Approved by: markm (mentor)
* In preparation for a new malloc implementation:jasone2006-01-125-66/+160
| | | | | | | | | | | | | * Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor)
* I wrote getnetconfig where I meant getnetpath in the previous revision.ceri2006-01-111-2/+2
|
* Add references to fhopen, fhstat, getfh, lgetfh and fhstatfs.grog2006-01-103-0/+6
| | | | Pointed out by: Antony Curtis <antony@mysql.com>
* o Document the possibility of putting 'b' in the flag field.ceri2006-01-061-5/+11
| | | | | | | While we don't use the NC_BROADCAST value of nc_flag anywhere in the RPC code, it is parseable by getnetconfigent(3) from /etc/netconfig. o Clean up some "see below"'s that were cut and pasted from netconfig.h.
* Document the recently-added EINVAL behavior.dds2006-01-051-1/+7
| | | | MFC after: 1 week
* gmon now supported on powerpcgrehan2005-12-291-2/+0
|
* The minbrk symbol is hidden the same on powerpc as other FreeBSD platforms.grehan2005-12-291-1/+1
|
* Add a64l(), l64a(), and l64a_r() XSI extentions. These functions converttrhodes2005-12-244-5/+290
| | | | | | | | between a 32-bit integer and a radix-64 ASCII string. The l64a_r() function is a NetBSD addition. PR: 51209 (based on submission, but very different) Reviewed by: bde, ru
* Add abort2 manual page.phk2005-12-232-1/+100
| | | | | Submitted by: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> Edited by: phk
* Explicitely use a "signed char" instead of a "char", for those archs wherecognet2005-12-221-2/+2
| | | | char defaults to unsigned.
* Implement ELF symbol versioning using GNU semantics. This code aimskan2005-12-181-0/+9
| | | | | | | | | to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Implement dlvsym() function to allow lookups for a specific version of a given symbol.
* Make our ELF64 type definitions match standards. In particular thismarcel2005-12-181-3/+3
| | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
* Add an extensible version of our *printf(3) implementation to libcphk2005-12-169-0/+2054
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | on probationary terms: it may go away again if it transpires it is a bad idea. This extensible printf version will only be used if either environment variable USE_XPRINTF is defined or one of the extension functions are called. or the global variable __use_xprintf is set greater than zero. In all other cases our traditional printf implementation will be used. The extensible version is slower than the default printf, mostly because less opportunity for combining I/O operation exists when faced with extensions. The default printf on the other hand is a bad case of spaghetti code. The extension API has a GLIBC compatible part and a FreeBSD version of same. The FreeBSD version exists because the GLIBC version may run afoul of our FILE * locking in multithreaded programs and it even further eliminate the opportunities for combining I/O operations. Include three demo extensions which can be enabled if desired: time (%T), hexdump (%H) and strvis (%V). %T can format time_t (%T), struct timeval (%lT) and struct timespec (%llT) in one of two human readable duration formats: "%.3llT" -> "20349.245" "%#.3llT" -> "5h39m9.245" %H will hexdump a sequence of bytes and takes a pointer and a length argument. The width specifies number of bytes per line. "%4H" -> "65 72 20 65" "%+4H" -> "0000 65 72 20 65" "%#4H" -> "65 72 20 65 |er e|" "%+#4H" -> "0000 65 72 20 65 |er e|" %V will dump a string in strvis format. "%V" -> "Hello\tWor\377ld" (C-style) "%0V" -> "Hello\011Wor\377ld" (octal) "%+V" -> "Hello%09Wor%FFld" (http-style) Tests, comments, bugreports etc are most welcome.
* With current pthread implementations, a mutex initialization willdavidxu2005-12-163-9/+19
| | | | | | | | | | | | allocate a memory block. sscanf calls __svfscanf which in turn calls fread, fread triggers mutex initialization but the mutex is not destroyed in sscanf, this leads to memory leak. To avoid the memory leak and performance issue, we create a none MT-safe version of fread: __fread, and instead let __svfscanf call __fread. PR: threads/90392 Patch submitted by: dhartmei MFC after: 7 days
* Sort .Xr by section number.davidxu2005-12-138-14/+14
| | | | Submitted by: ru
* /* You're not supposed to hit this problem */phk2005-12-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For some denormalized long double values, a bug in __hldtoa() (called from *printf()'s %A format) results in a base 16 digit being rounded up from 0xf to 0x10. When this digit is subsequently converted to string format, an index of 10 reaches past the end of the uppper-case hex/char array, picking up whatever the code segment happen to contain at that address. This mostly seem to be some character from the upper half of the byte range. When using the %a format instead of %A, the first character past the end of the lowercase hex/char table happens to be index 0 in the uppercase hex/char table hextable and therefore the string representation features a '0', which is supposedly correct. This leads me to belive that the proper fix _may_ be as simple as masking all but the lower four bits off after incrementing a hex-digit in libc/gdtoa/_hdtoa.c:roundup(). I worry however that the upper bit in 0x10 indicates a carry not carried. Until das@ or bde@ finds time to visit this issue, extend the hexdigit arrays with a 17th index containing '?' so that we get a invalid but consistent and printable output in both %a and %A formats whenever this bug strikes. This unmasks the bug in the %a format therefore solving the real issue may both become easier and more urgent. Possibly related to: PR 85080 With help by: bde@
* Add cross references to siginfo.3.davidxu2005-12-1310-3/+13
|
* Fix markeup.davidxu2005-12-061-1/+2
| | | | Submitted by: ru
* Fix markup.davidxu2005-12-051-5/+13
| | | | Submitted by: ru
* Document SIGEV_NONE and SIGEV_SIGNAL.davidxu2005-12-051-0/+15
|
* Fix prototype.ru2005-12-031-1/+1
|
* Fix type of argument.ru2005-12-031-1/+1
|
* Break hard sentence break.ru2005-12-031-1/+2
|
* Switch BUILD_ARCH in Makefile to use uname -p suggested by ru.ambrisko2005-12-033-6/+42
| | | | | | | | | | | | | | Switch strncpy to strlcpy suggested by gad and issue found by pjd. Add to uname(3) man page describing: UNAME_s UNAME_r UNAME_v UNAME_m Add to getosreldate(3) man page describing: OSVERSION Submitted by: ru, pjd/gad Reviewed by: ru (man pages)
* Remove implementation-defined, it has already been described in NOTESdavidxu2005-12-031-5/+0
| | | | section.
* Remove implementation-defined sentences.davidxu2005-12-033-22/+5
|
* Fix lots of markup and content bug.davidxu2005-12-037-139/+201
| | | | Submitted by: ru
* syscall -> system call.davidxu2005-12-027-25/+25
|
* Fix markup.davidxu2005-12-021-1/+4
|
* Unbreak build when I fluff the clean-up of __FBSDID diff reductionambrisko2005-12-021-0/+2
| | | | | | before commit. pointyhat++
* Add support to easily build FreeBSD unpacked in a chroot of anotherambrisko2005-12-022-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | FreeBSD machine. To do this add the man 1 uname changes to __xuname.c so we can override the settings it reports. Add OSVERSION override to getosreldate. Finally which Makefile.inc1 to use uname -m instead of sysctl -n hw.machine_arch to get the arch. type. With these change you can put a complete FreeBSD OS image into a chroot set: UNAME_s=FreeBSD UNAME_r=4.7-RELEASE UNAME_v="FreeBSD $UNAME_r #1: Fri Jul 22 20:32:52 PDT 2005 fake@fake:/usr/obj/usr/src/sys/FAKE" UNAME_m=i386 UNAME_p=i386 OSVERSION=470000 on an amd64 or i386 and it just work including building ports and using pkg_add -r etc. The caveat for this example is that these patches have to be applied to FreeBSD 4.7 and the uname(1) changes need to be merged. This also addresses issue with libtool. This is usefull for when a build machine has been trashed for an old release and we want to do a build on a new machine that FreeBSD 4.7 won't run on ...
* Tweak markup for POSIX standards. Minor wordsmithing.imp2005-12-011-3/+7
| | | | Submitted by: ru@
* Document O_NOCTTY and O_SYNC. O_NOCTTY is a nop on freebsd, while onimp2005-12-011-0/+17
| | | | | | | other systems it prevents a tty from becoming a controlling tty on the open. O_SYNC is the POSIX name for O_FSYNC. The Markup Police may need to tweak my references to standards.
* Add MLINK for execvP(3).jhb2005-12-011-1/+1
| | | | | | PR: docs/89783 Submitted by: Andreas Kohn andreas at syndrom23 dot de MFC after: 3 days
* Update conformance and history sections.davidxu2005-11-304-4/+16
|
* Symlink mq_send to mq_timedsend.davidxu2005-11-301-0/+2
| | | | Symlink mq_receive to mq_timedreceive.
* Add manuals for POSIX message queue.davidxu2005-11-308-2/+1077
|
* Implement following POSIX message queue interfaces:davidxu2005-11-262-1/+74
| | | | mq_close, mq_getattr, mq_receive, mq_send.
* Make SYNOPSIS compile.ru2005-11-241-1/+1
| | | | Attn peter@: this manpage wasn't synced with your code changes.
* Fix prototypes.ru2005-11-241-3/+3
| | | | | Attn davidxu@: most likely, the description should also be tweaked after your undocumented changes that changed these prototypes.
OpenPOWER on IntegriCloud