summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Next stage of stdio cleanup: Retire __sFILEX and merge the fields back intoJohn Baldwin2008-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 Notes: svn path=/head/; revision=178287
* Implement fdopendir(3) by splitting __opendir2() into two parts, the upper partXin LI2008-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. Notes: svn path=/head/; revision=178256
* Style fixes to opendir.c:Xin LI2008-04-161-6/+3
| | | | | | | | - Use /*- for copyright block; - ANSIfy. Notes: svn path=/head/; revision=178253
* Sort MAN and MLINKS.Ruslan Ermilov2008-04-161-25/+26
| | | | Notes: svn path=/head/; revision=178249
* Connect newly added manpages to the build.Ruslan Ermilov2008-04-161-5/+15
| | | | | | | Submitted by: kib Notes: svn path=/head/; revision=178248
* Man pages for the openat(2), fexecve(2) and related syscalls.Konstantin Belousov2008-04-1615-40/+1098
| | | | | | | Reviewed by: ru Notes: svn path=/head/; revision=178245
* Doh! Extra mips in the path. Remove these and wait until tomorrowWarner Losh2008-04-1611-600/+0
| | | | | | | when I have more brain cells to try again. Notes: svn path=/head/; revision=178239
* Turns out the machine/asm.h isn't needed here, since SYS.h alreadyWarner Losh2008-04-1610-12/+1
| | | | | | | included it. Notes: svn path=/head/; revision=178238
* FreeBSD/mips libc support. Merged from perforce mips2-jnpr branch.Warner Losh2008-04-1611-0/+611
| | | | Notes: svn path=/head/; revision=178237
* _vfork is not in libthr, remove the reference.David Xu2008-04-161-1/+0
| | | | Notes: svn path=/head/; revision=178236
* Fix one-byte buffer overflow: NUL gets written to the buffer, but isn'tColin Percival2008-04-151-1/+1
| | | | | | | | | | | | | | counted in the width specification in scanf. This is not a security problem, since this function is only used to parse a user's configuration file. Submitted by: Joerg Sonnenberger Obtained from: dragonflybsd MFC after: 1 week Notes: svn path=/head/; revision=178234
* Implement POSIX function tcgetsid() which returns session id.David Xu2008-04-154-1/+84
| | | | | | | PR: stand/107561 Notes: svn path=/head/; revision=178219
* don't include pthread_np.h, it is not used.David Xu2008-04-141-1/+0
| | | | Notes: svn path=/head/; revision=178194
* Use calloc() instaed of zeroing memory ourselves.Xin LI2008-04-131-2/+1
| | | | Notes: svn path=/head/; revision=178175
* Unbreak the build for arm and powerpc.David Schultz2008-04-122-0/+3
| | | | | | | Pointy hat to yours truly. Notes: svn path=/head/; revision=178154
* Updates for changes in the way printf() handles hex floating pointDavid Schultz2008-04-121-4/+5
| | | | | | | numbers. Notes: svn path=/head/; revision=178141
* Make several changes to the way printf handles hex floating point (%a):David Schultz2008-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. Notes: svn path=/head/; revision=178140
* Fix some bugs that caused sparc64's quad precision sqrt to getDavid Schultz2008-04-121-5/+5
| | | | | | | | | the wrong answer for virtually all inputs. Thanks to remko for access to a sparc64 box for testing. Notes: svn path=/head/; revision=178139
* Make the software emulator for long doubles set the FPU exceptionDavid Schultz2008-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. Notes: svn path=/head/; revision=178138
* Add memrchr(3).Xin LI2008-04-104-4/+74
| | | | | | | Obtained from: OpenBSD Notes: svn path=/head/; revision=178051
* Move the cpuset functions from FBSD_1.0 to FBSD_1.1. All symbols addedDaniel Eischen2008-04-071-5/+5
| | | | | | | to 8.0 belong in the FBSD_1.1 symbol namespace. Notes: svn path=/head/; revision=177980
* On i386, don't try to do network-type stuff if the device name is'nt pxeN.Doug Rabson2008-04-051-0/+7
| | | | Notes: svn path=/head/; revision=177935
* Add some compatibility code so that software which is built to use the newDoug Rabson2008-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 Notes: svn path=/head/; revision=177911
* Minor style(9) nit: move to using ANSI definition of functions.Warner Losh2008-04-031-19/+5
| | | | Notes: svn path=/head/; revision=177893
* Fix descriptions of "struct msqid_ds and "struct ipc_perm" to matchRuslan Ermilov2008-04-031-11/+11
| | | | | | | harsh reality. Notes: svn path=/head/; revision=177882
* Fix some corner cases:David Schultz2008-04-032-10/+20
| | | | | | | | | | | | - fma(x, y, z) returns z, not NaN, if z is infinite, x and y are finite, x*y overflows, and x*y and z have opposite signs. - fma(x, y, z) doesn't generate an overflow, underflow, or inexact exception if z is NaN or infinite, as per IEEE 754R. - If the rounding mode is set to FE_DOWNWARD, fma(1.0, 0.0, -0.0) is -0.0, not +0.0. Notes: svn path=/head/; revision=177875
* put THR_CRITICAL_LEAVE into do .. while statement.David Xu2008-04-031-2/+4
| | | | Notes: svn path=/head/; revision=177871
* style(9) cleanupKevin Lo2008-04-032-2/+2
| | | | Notes: svn path=/head/; revision=177870
* add __hidden suffix to _umtx_op_err, this eliminates PLT.David Xu2008-04-031-1/+1
| | | | Notes: svn path=/head/; revision=177869
* Non-portable functions are in pthread_np.h, fix compiling problem.David Xu2008-04-021-1/+1
| | | | Notes: svn path=/head/; revision=177861
* Add pthread_setaffinity_np and pthread_getaffinity_np to libc namespace.David Xu2008-04-023-2/+4
| | | | Notes: svn path=/head/; revision=177855
* Remove unused functions.David Xu2008-04-022-55/+0
| | | | Notes: svn path=/head/; revision=177854
* Replace function _umtx_op with _umtx_op_err, the later function directlyDavid Xu2008-04-029-51/+112
| | | | | | | | | returns errno, because errno can be mucked by user's signal handler and most of pthread api heavily depends on errno to be correct, this change should improve stability of the thread library. Notes: svn path=/head/; revision=177853
* Replace userland rwlock with a pure kernel based rwlock, the newDavid Xu2008-04-024-223/+199
| | | | | | | | | implementation does not switch pointers when it resumes waiters. Asked by: jeff Notes: svn path=/head/; revision=177850
* Normally, we are often reading local time rather than setting time zone,David Xu2008-04-011-22/+63
| | | | | | | | replace mutex with rwlock, this should eliminate lock contention in most cases. Notes: svn path=/head/; revision=177824
* Restore normal pthread_cond_signal path to avoid some obscure races.David Xu2008-04-011-2/+3
| | | | Notes: svn path=/head/; revision=177823
* return EAGAIN early rather than running bunch of code later, micro optimizeDavid Xu2008-04-011-1/+3
| | | | | | | static branch prediction. Notes: svn path=/head/; revision=177818
* Remove a (bogus) remnant of debugging this on sparc64.David Schultz2008-03-311-1/+1
| | | | Notes: svn path=/head/; revision=177793
* Add the libc glue and headers definitions for the *at() syscalls.Konstantin Belousov2008-03-311-0/+18
| | | | | | | | | | Based on the submission by rdivacky, sponsored by Google Summer of Code 2007 Reviewed by: rwatson, rdivacky Tested by: pho Notes: svn path=/head/; revision=177791
* Include an extra byte for the trailing NUL. <sigh>Tim Kientzle2008-03-311-1/+1
| | | | | | | Pointy hat: Me Notes: svn path=/head/; revision=177776
* Rewrite rwlock to user atomic operations to change rwlock state, thisDavid Xu2008-03-313-141/+281
| | | | | | | | | | eliminates internal mutex lock contention when most rwlock operations are read. Orignal patch provided by: jeff Notes: svn path=/head/; revision=177770
* Add assembly versions of remquol() and remainderl().David Schultz2008-03-306-4/+228
| | | | Notes: svn path=/head/; revision=177768
* Hook remquol() and remainderl() up to the build.David Schultz2008-03-304-12/+33
| | | | Notes: svn path=/head/; revision=177766
* Implement remainderl() as a wrapper around remquol(). The extra workDavid Schultz2008-03-302-0/+44
| | | | | | | remquol() performs to compute the quotient is negligible. Notes: svn path=/head/; revision=177765
* Implement remquol() based on remquo().David Schultz2008-03-302-0/+183
| | | | Notes: svn path=/head/; revision=177764
* Implement csqrtl().David Schultz2008-03-305-13/+135
| | | | Notes: svn path=/head/; revision=177761
* Hook hypotl() and cabsl() up to the build.David Schultz2008-03-303-6/+7
| | | | Notes: svn path=/head/; revision=177760
* Document hypotl().David Schultz2008-03-301-12/+17
| | | | | | | Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Notes: svn path=/head/; revision=177759
* Alias hypotl() and cabsl() for platforms where long double is the sameDavid Schultz2008-03-302-2/+12
| | | | | | | as double. Notes: svn path=/head/; revision=177758
* Implement cabsl() in terms of hypotl().David Schultz2008-03-301-0/+20
| | | | | | | Submitted by: Steve Kargl <sgk@troutmask.apl.washington.edu> Notes: svn path=/head/; revision=177757