summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Add rb_wrap(), which creates C function wrappers for most rb_*()jasone2008-05-011-36/+194
| | | | | | | | | | macros. Add rb_foreach_next() and rb_foreach_reverse_prev(), which make it possible to re-synchronize tree iteration after the tree has been modified. Rename rb_tree_new() to rb_new().
* o Add MIPS to the list of architectures with defined TLS_TCB_ALIGNgonzo2008-04-291-2/+2
| | | | | | o Stick with TLS Variant II for MIPS for the moment. Approved by: imp
* Set QUANTUM_2POW_MIN and SIZEOF_PTR_2POW parameters for MIPSgonzo2008-04-291-0/+5
| | | | Approved by: imp
* Check for integer overflow before calling sbrk(2), since it uses ajasone2008-04-291-0/+7
| | | | signed increment argument, but the size is an unsigned integer.
* Correct minor typos in SCTP man pages.rwatson2008-04-282-2/+1
| | | | MFC after: 3 days
* Add support files for compiling with soft-float. This has beenmarcel2008-04-273-0/+448
| | | | | copied from ARM and modified to warrant the duplication. Oh, and to make it work for PowerPC :-)
* Add mips support libc from the mips2-jnpr branch of perforce.imp2008-04-2660-0/+3908
|
* Have the man page catch up with the namespace pollution cleanup thatscf2008-04-261-1/+0
| | | | | | | | | | occurred between 2001-2003. Thanks to bde for the history lesson[1] concerning sys/types.h and the many system calls that at one time (pre-2001) were required by POSIX to include it. 1. http://lists.freebsd.org/pipermail/freebsd-arch/2008-April/008126.html MFC after: 3 days
* Stricter check for integer overflow.ru2008-04-241-0/+2
|
* Implement red-black trees without using parent pointers, and store thejasone2008-04-232-116/+947
| | | | | | | | | color bit in the least significant bit of the right child pointer, in order to reduce red-black tree linkage overhead by ~2X as compared to sys/tree.h. Use the new red-black tree implementation in malloc, which drops memory usage by ~0.5 or ~1%, for 32- and 64-bit systems, respectively.
* Fix a leak in the recent fixes for file descriptors > SHRT_MAX. In thejhb2008-04-221-0/+1
| | | | | | | | case of a file descriptor we can't handle, clear the FILE structure's flags so it can be reused. MFC after: 1 week Reported by: otto @ OpenBSD
* Document that you must include <sys/param.h> before <sys/cpuset.h>.antoine2008-04-202-0/+2
| | | | Approved by: rwatson (mentor)
* Don't forget to free() currency_symbol and asciivalue when multipleru2008-04-191-0/+4
| | | | | | | | conversion specifiers for them are present. Submitted by: Maxim Dounin <mdounin@mdounin.ru> Obtained from: NetBSD (partially) MFC after: 3 days
* Better strfmon(3) conversion specifiers sanity checking.ru2008-04-191-1/+8
| | | | | | | | | | There were no checks for left and right precisions at all, and a check for field width had integer overflow bug. Reported by: Maksymilian Arciemowicz Security: http://securityreason.com/achievement_securityalert/53 Submitted by: Maxim Dounin <mdounin@mdounin.ru> MFC after: 3 days
* Next stage of stdio cleanup: Retire __sFILEX and merge the fields back intojhb2008-04-1726-143/+72
| | | | | | | | | | | | | | | | | | | __sFILE. This was supposed to be done in 6.0. Some notes: - Where possible I restored the various lines to their pre-__sFILEX state. - Retire INITEXTRA() and just initialize the wchar bits (orientation and mbstate) explicitly instead. The various places that used INITEXTRA didn't need the locking fields or _up initialized. (Some places needed _up to exist and not be off the end of a NULL or garbage pointer, but they didn't require it to be initialized to a specific value.) - For now, stdio.h "knows" that pthread_t is a 'struct pthread *' to avoid namespace pollution of including all the pthread types in stdio.h. Once we remove all the inlines and make __sFILE private it can go back to using pthread_t, etc. - This does not remove any of the inlines currently and does not change any of the public ABI of 'FILE'. MFC after: 1 month Reviewed by: peter
* Implement fdopendir(3) by splitting __opendir2() into two parts, the upper partdelphij2008-04-164-6/+71
| | | | | | deals with the usual __opendir2() calls, and the rest part with an interface translator to expose fdopendir(3) functionality. Manual page was obtained from kib@'s work for *at(2) system calls.
* Style fixes to opendir.c:delphij2008-04-161-6/+3
| | | | | - Use /*- for copyright block; - ANSIfy.
* Sort MAN and MLINKS.ru2008-04-161-25/+26
|
* Connect newly added manpages to the build.ru2008-04-161-5/+15
| | | | Submitted by: kib
* Man pages for the openat(2), fexecve(2) and related syscalls.kib2008-04-1615-40/+1098
| | | | Reviewed by: ru
* Doh! Extra mips in the path. Remove these and wait until tomorrowimp2008-04-1611-600/+0
| | | | when I have more brain cells to try again.
* Turns out the machine/asm.h isn't needed here, since SYS.h alreadyimp2008-04-1610-12/+1
| | | | included it.
* FreeBSD/mips libc support. Merged from perforce mips2-jnpr branch.imp2008-04-1611-0/+611
|
* Implement POSIX function tcgetsid() which returns session id.davidxu2008-04-154-1/+84
| | | | PR: stand/107561
* Use calloc() instaed of zeroing memory ourselves.delphij2008-04-131-2/+1
|
* Unbreak the build for arm and powerpc.das2008-04-122-0/+3
| | | | Pointy hat to yours truly.
* Updates for changes in the way printf() handles hex floating pointdas2008-04-121-4/+5
| | | | numbers.
* Make several changes to the way printf handles hex floating point (%a):das2008-04-123-207/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Previously, printing the number 1.0 could produce 0x1p+0, 0x2p-1, 0x4p-2, or 0x8p-3, depending on what happened to be convenient. This meant that printing a value as a double and printing the same value as a long double could produce different (but equivalent) results. The change is to always make the leading digit a 1, unless the number is 0. This solves the aforementioned problem and has several other advantages. 2. Use the FPU to do rounding. This is far simpler and more portable than manipulating the bits, and it fixes an obsure round-to-even bug. It also raises the exceptions now required by IEEE 754R. The drawbacks are that it is usually slightly slower, and it makes printf less effective as a debugging tool when the FPU is hosed (e.g., due to a buggy softfloat implementation). 3. On i386, twiddle the rounding precision so that (2) works properly for long doubles. 4. Make several simplifications that are now possible due to (2). 5. Split __hldtoa() into a separate file. Thanks to remko for access to a sparc64 box for testing.
* Fix some bugs that caused sparc64's quad precision sqrt to getdas2008-04-121-5/+5
| | | | | | the wrong answer for virtually all inputs. Thanks to remko for access to a sparc64 box for testing.
* Make the software emulator for long doubles set the FPU exceptiondas2008-04-121-0/+15
| | | | | | | flags appropriately. The next step is to make it raise a SIGFPE if any exceptions are unmasked. Thanks to remko for access to a sparc64 box for testing.
* Add memrchr(3).delphij2008-04-104-4/+74
| | | | Obtained from: OpenBSD
* Move the cpuset functions from FBSD_1.0 to FBSD_1.1. All symbols addeddeischen2008-04-071-5/+5
| | | | to 8.0 belong in the FBSD_1.1 symbol namespace.
* Add some compatibility code so that software which is built to use the newdfr2008-04-043-1/+92
| | | | | | | struct flock with l_sysid member can work properly on an an old kernel which doesn't support l_sysid. Sponsored by: Isilon Systems
* Minor style(9) nit: move to using ANSI definition of functions.imp2008-04-031-19/+5
|
* Fix descriptions of "struct msqid_ds and "struct ipc_perm" to matchru2008-04-031-11/+11
| | | | harsh reality.
* style(9) cleanupkevlo2008-04-032-2/+2
|
* Add pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.davidxu2008-04-022-0/+4
|
* Normally, we are often reading local time rather than setting time zone,davidxu2008-04-011-22/+63
| | | | | replace mutex with rwlock, this should eliminate lock contention in most cases.
* Add the libc glue and headers definitions for the *at() syscalls.kib2008-03-311-0/+18
| | | | | | | Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho
* Don't call xdrrec_skiprecord in the non-blocking case. Ifdfr2008-03-301-1/+2
| | | | | | | | | | | __xdrrec_getrec has returned TRUE, then we have a complete request in the buffer - calling xdrrec_skiprecord is not necessary. In particular, if there is another record already buffered on the stream, xdrrec_skiprecord will discard both this request and the next one, causing the call to xdr_callmsg to fail and the stream to be closed. Sponsored by: Isilon Systems
* Don't assume that there is readable data on the stream after thedfr2008-03-301-0/+6
| | | | fragment header.
* Document modff() and modfl(). Technically, modff() and modfl()das2008-03-292-12/+23
| | | | | | live in libm, while modf() lives in libc due to historical mistakes. I'm claiming in the manpage that they all live in libm, since programmers should not rely on the mistake.
* - Add a man page for cpuset_getaffinity() and cpuset_setaffinity() andjeff2008-03-292-2/+159
| | | | | | hook it up to the build. Reviewed by: brueffer (skeleton and formatting assistance)
* - Add a man page for cpuset(), cpuset_setid(), and cpuset_getid() and hookjeff2008-03-292-1/+227
| | | | | | it up to the build. Reviewed by: brueffer (skeleton and formatting assistance)
* Add support to mincore for detecting whether a page is part of aps2008-03-281-0/+2
| | | | | | "super" page or not. Reviewed by: alc, ups
* Removed no longer existing CTL_MACHDEP defines.ru2008-03-261-12/+1
| | | | Inspired by: phk
* Add the new kernel-mode NFS Lock Manager. To use it instead of thedfr2008-03-263-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | user-mode lock manager, build a kernel with the NFSLOCKD option and add '-k' to 'rpc_lockd_flags' in rc.conf. Highlights include: * Thread-safe kernel RPC client - many threads can use the same RPC client handle safely with replies being de-multiplexed at the socket upcall (typically driven directly by the NIC interrupt) and handed off to whichever thread matches the reply. For UDP sockets, many RPC clients can share the same socket. This allows the use of a single privileged UDP port number to talk to an arbitrary number of remote hosts. * Single-threaded kernel RPC server. Adding support for multi-threaded server would be relatively straightforward and would follow approximately the Solaris KPI. A single thread should be sufficient for the NLM since it should rarely block in normal operation. * Kernel mode NLM server supporting cancel requests and granted callbacks. I've tested the NLM server reasonably extensively - it passes both my own tests and the NFS Connectathon locking tests running on Solaris, Mac OS X and Ubuntu Linux. * Userland NLM client supported. While the NLM server doesn't have support for the local NFS client's locking needs, it does have to field async replies and granted callbacks from remote NLMs that the local client has contacted. We relay these replies to the userland rpc.lockd over a local domain RPC socket. * Robust deadlock detection for the local lock manager. In particular it will detect deadlocks caused by a lock request that covers more than one blocking request. As required by the NLM protocol, all deadlock detection happens synchronously - a user is guaranteed that if a lock request isn't rejected immediately, the lock will eventually be granted. The old system allowed for a 'deferred deadlock' condition where a blocked lock request could wake up and find that some other deadlock-causing lock owner had beaten them to the lock. * Since both local and remote locks are managed by the same kernel locking code, local and remote processes can safely use file locks for mutual exclusion. Local processes have no fairness advantage compared to remote processes when contending to lock a region that has just been unlocked - the local lock manager enforces a strict first-come first-served model for both local and remote lockers. Sponsored by: Isilon Systems PR: 95247 107555 115524 116679 MFC after: 2 weeks
* Fix some "in in" typos in comments.brueffer2008-03-261-1/+1
| | | | | | | PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
* Compile libthr with warnings.ru2008-03-251-0/+3
| | | | (Somehow this file sneaked from initial commit.)
* Compile libthr with warnings.ru2008-03-251-0/+3
|
OpenPOWER on IntegriCloud