summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Save errno before calling pthread_mutex_lock because pthread_mutex_lockdavidxu2006-05-111-2/+2
| | | | may change errno unexpectly.
* Increase the minimum chunk size by a power of two (32kB --> 64kB, assumingjasone2006-05-101-2/+2
| | | | | | | | 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.
* A few minor wording changes and a clarification about error conditions.bsd2006-05-031-10/+10
|
* Fix alignment problem on AMD64.ume2006-05-021-4/+4
| | | | | | Reported by: Pascal Hofstee <caelian__at__gmail.com> Submitted by: Michael Bushkov <bushman__at__rsu.ru> Tested by: Pascal Hofstee <caelian__at__gmail.com>
* `cache' couldn't co-exist with `compat'.ume2006-04-301-2/+3
| | | | Submitted by: "Michael Bushkov" <bushman__at__rsu.ru>
* - Extend the nsswitch to support Services, Protocols and Rpcume2006-04-2821-737/+5438
| | | | | | | | databases. - Make nsswitch support caching. Submitted by: Michael Bushkov <bushman__at__rsu.ru> Sponsored by: Google Summer of Code 2005
* Change the semantics of brk_max to dynamically deal with data segmentjasone2006-04-271-71/+83
| | | | | | | | | | | | | | | 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>
* Oops, correct the weak reference (s/fclose/fcloseall).deischen2006-04-221-1/+1
| | | | Spotted by: Antoine Brodin (antoine _dot_ brodin _at_ laposte _dot_ net)
* Now that libc has fcloseall(), remove _cleanup() from the listdeischen2006-04-221-1/+0
| | | | of FreeBSD private symbols.
* Add fcloseall() to libc. This removes the need to export _cleanup().deischen2006-04-225-4/+60
| | | | | | Linux also provides an fcloseall() implementation. Discussed on: arch
* Update for rev 1.205 of vm_mmap.c.trhodes2006-04-211-7/+6
| | | | Submitted by: fanf
* Correct usage example.ceri2006-04-181-1/+1
| | | | | | PR: docs/95059 Submitted by: Jos Backus MFC after: 4 days
* o dbm_close(3) returns void not zero or anything else. Touch .Dd.maxim2006-04-161-5/+1
| | | | | | PR: docs/80070 Submitted by: Aleksej Saushev MFC after: 2 weeks
* For _Qp_{fge,fgt,fle,flt}() the SCD states that "Exceptions mimic fcmpeq",marius2006-04-161-4/+4
| | | | | | | this means they should set the cmpe flag when calling __fpu_compare(). Submitted by: stefanf MFC after: 2 weeks
* - make reentrant version of netdb functions glibc style API, andume2006-04-1516-705/+1258
| | | | | | | expose them to outside of libc. - make netdb functions NSS friendly. Reviewed by: arch@ and current@ (no objection)
* Don't export __gdtoa. The only known ports that rely ondeischen2006-04-151-5/+1
| | | | | | | this or the deprecated POSIX functions {e,g,f}cvt() have newer versions that do not (rely on them). Requested by: marius
* o Document SO_NOSIGPIPE, touch .Dd.maxim2006-04-151-1/+9
| | | | | | PR: docs/78479 Submitted by: Mikko Tyolajarvi MFC after: 2 weeks
* List pwritev in the NAME section.ru2006-04-141-1/+2
|
* s/soley/solelyschweikh2006-04-131-1/+1
|
* - Move _Qp_* and __dtoul from FBSDprivate to the list of FBSD_1.0 symbolsmarius2006-04-111-35/+18
| | | | | | | | | | | | | | | | | | | | | | | 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
* Document that VIS_CSTYLE encodes space (040) as '\s'.brueffer2006-04-091-1/+3
| | | | | | PR: 95546 Submitted by: Jan Schaumann <jschauma@netmeister.org> MFC after: 3 days
* Don't test if RES_INIT is set to see res_state structure isume2006-04-081-1/+1
| | | | | initialized. Some application may reset RES_INIT. Use the way in __res_vinit(), instead.
* Add an unreachable return statement, in order to avoid a compiler warningjasone2006-04-051-0/+1
| | | | | | for non-standard optimization levels. Reported by: Michael Zach <zach@webges.com>
* Only initialize the first per-chunk page map element for free runs. Thisjasone2006-04-051-31/+16
| | | | makes run split/coalesce operations of complexity lg(n) rather than n.
* Add malloc_usable_size() to the RETURN VALUES section.jasone2006-04-041-1/+6
|
* Add init_lock, and use it to protect against allocator initializationjasone2006-04-041-8/+21
| | | | | | | | 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
* Refactor per-run bitmap manipulation functions so that bitmap offsets onlyjasone2006-04-041-69/+131
| | | | | | | | | | | | | | | | | 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]
* Add missing #if's for NO_FLOATING_POINTphk2006-04-015-4/+16
|
* fix indent.ume2006-04-011-9/+9
|
* Add __gdtoa to the list of FreeBSD private symbols. Unfortunately,deischen2006-04-011-0/+4
| | | | | | | | 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.
* Optimize runtime performance, primary using the following techniques:jasone2006-03-301-285/+294
| | | | | | | | | | | | | | | * 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.
* Expose res_update and friends again. At least, ports/mail/spamilterume2006-03-306-117/+33
| | | | | | | | | 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
* Fix a bug where, for 6-byte sequences, the top 6 bits get compared totrhodes2006-03-301-1/+1
| | | | | 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.
* Add __collate_load_error and __collate_range_cmp to the list ofdeischen2006-03-303-0/+4
| | | | | | | | | | | | | 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!)
* Add malloc_usable_size(3).jasone2006-03-284-3/+47
| | | | Discussed with: arch@
* Add semaphore functions, and remove some dupes from the #if 0 section.des2006-03-282-4/+20
|
* Add a bunch of missing pthread functions, and move out-of-order functions.des2006-03-282-13/+128
|
* If the query choked with EDNS0, retry without EDNS0.ume2006-03-281-8/+24
| | | | Obtained from: res_nquery() of BIND9.
* Allocate space for thread pointer, this allows thread library to accessdavidxu2006-03-281-3/+3
| | | | its pointer from begin, and simplifies _get_curthread() in libthr.
* Allow the 'n' option to decrease the number of arenas below the default,jasone2006-03-261-2/+16
| | | | | to as little as one arena. Also, limit the number of arenas to avoid a potential invariant violation in base_alloc().
* Add comments and reformat/rearrange code. There are no significantjasone2006-03-261-208/+224
| | | | functional changes in this commit.
* - Use ANSI C prototype.ume2006-03-253-152/+59
| | | | - Remove trailing space.
* Convert TINY_MIN_2POW from a cpp macro to tiny_min_2pow (a variable), andjasone2006-03-241-21/+37
| | | | | | | | | | | | | | | 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
* When res_nquerydomain() returns SERVFAIL, we should try next domain.ume2006-03-242-5/+26
|
* When res_send() fails, we should reserve an error code.ume2006-03-241-2/+2
|
* Add USE_BRK-specific code in malloc_init_hard() to allow the firstjasone2006-03-241-65/+110
| | | | | | | | | | | | | | | | | | | 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.
* Document that the documented 2GB mmap limit is actually apeter2006-03-231-22/+8
| | | | | | | | 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.
* It's not enough to provide symbol map files; you also have to add themdes2006-03-233-0/+6
| | | | | | to ${SYM_MAPS}. This unbreaks world with SYMVER_ENABLED. Pointy hat to: ume
* We have gmtime_r(3).ume2006-03-211-0/+1
|
* Update the resolver in libc to BIND9's one.ume2006-03-2142-7838/+369
| | | | | | | | | | | | | | | | | | | | | | 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)
OpenPOWER on IntegriCloud