summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Make recv() and send() cancellation points, as required by POSIX.jilles2013-06-092-6/+10
| | | | | | | | | | | | | | | | | | | | Call the recvfrom() and sendto() functions overridden by libthr instead of the _recvfrom() and _sendto() versions that are not cancellation points.
* | | | Minor mdoc fixes.joel2013-06-091-3/+3
| | | |
* | | | libstand: Reset the seek pointer in ext2fs as done in UFS.pfg2013-06-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on r134760: Reset the seek pointer to 0 when a file is successfully opened, since otherwise the initial seek offset will contain the directory offset of the filesystem block that contained its directory entry. This bug was mostly harmless because typically the directory is less than one filesystem block in size so the offset would be zero. It did however generally break loading a kernel from the (large) kernel compile directory. Also reset the seek pointer when a new inode is opened in read_inode(), though this is not actually necessary now because all callers set it afterwards. PR: 177328 Submitted by: Eric van Gyzen Reviewed by: iedowse MFC after: 5 days
* | | | sigaction(2): Document various non-POSIX functions as async-signal safe.jilles2013-06-081-2/+15
| | | |
* | | | Add new system call - aio_mlock(). The name speaks for itself. It allowsglebius2013-06-083-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to perform the mlock(2) operation, which can consume a lot of time, under control of aio(4). Reviewed by: kib, jilles Sponsored by: Nginx, Inc.
* | | | Use improved __sync_*() intrinsics for MIPS in userspace as well.ed2013-06-088-56/+5
| | | | | | | | | | | | | | | | | | | | r251524 introduced custom tailored versions for MIPS of these functions for kernel-space code. We can just reuse them in userspace as well.
* | | | Finish pulling in the NetBSD setjmp/longjmp updates on ARM.andrew2013-06-074-4/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store/restore the VFP registers in setjmp/longjmp on ARM EABI if VFP is enabled in the kernel. It checks the hw.floatingpoint sysctl to see if floating-point is available and uses this to determine if it should store them. If it does it uses a different magic value so longjmp is able to know if it should load them.
* | | | Include machine/setjmp.h to get the definition of _JB_MAGIC__SETJMP. Thisandrew2013-06-071-1/+3
| | | | | | | | | | | | | | | | allows us to remove it from the ARM copy of machine/asm.h.
* | | | Remove an extra copy of _setjmp from libstand. We have used the libc versionandrew2013-06-071-106/+0
| | | | | | | | | | | | | | | | of this function since r183876.
* | | | Add libusb_get_port_numbersemaste2013-06-073-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | libusbx deprecated libusb_get_port_path and replaced it with libusb_get_port_numbers. The latter omits an extra parameter which was unused in the FreeBSD implementation anyway.
* | | | Switch to 2-clause license and standard textemaste2013-06-062-26/+22
| | | | | | | | | | | | | | | | Approved by: bms@
* | | | Remove part of the NetBSD longjmp code that was not ready to be merged.andrew2013-06-051-2/+1
| | | |
* | | | Style fixes.das2013-06-054-54/+58
| | | | | | | | | | | | | | | | Submitted by: bde
* | | | Start to merge the updated ARM NetBSD setjump/longjmp functions. To beginandrew2013-06-042-75/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with merge the functions but leave out the code to save/load the VFP registers as that requires other changes to ensure the VFP is enabled first. This removes storing the old fpa registers. These were never fully supported, and the only user of this code I can find have moved to newer CPUs which use a VFP.
* | | | mdoc: convert .Fd to .In, which is much nicer.joel2013-06-043-7/+7
| | | |
* | | | Add man links for expl(3) and expm1l(3).das2013-06-041-2/+2
| | | |
* | | | Fix a typo: XPORT_SPI should be tested against transport, nor protocol.delphij2013-06-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Sascha Wildner <swildner dragonflybsd org> Reviewed by: mjacob MFC after: 2 weeks
* | | | Change a comma to a semicolon.kargl2013-06-031-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove a blank line that crept into the declarations. Fix a comment to show a sign on a NaN.
* | | | ld80 and ld128 implementations of expm1l(). This code started lifekargl2013-06-036-4/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as a fairly faithful implementation of the algorithm found in PTP Tang, "Table-driven implementation of the Expm1 function in IEEE floating-point arithmetic," ACM Trans. Math. Soft., 18, 211-222 (1992). Over the last 18-24 months, the code has under gone significant optimization and testing. Reviewed by: bde Obtained from: bde (most of the optimizations)
* | | | Fix two comments that got lost in the disentanglement of the larger diff.kargl2013-06-031-1/+6
| | | |
* | | | ld80/s_expl.c:kargl2013-06-032-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use integral numerical constants, and let the compiler do the conversion to long double. ld128/s_expl.c: * Use integral numerical constants, and let the compiler do the conversion to long double. * Use the ENTERI/RETURNI macros, which are no-ops on ld128. This however makes the ld80 and ld128 identical. Reviewed by: bde (as part of larger diff)
* | | | Micro-optimization: move the unary mius operator to operatekargl2013-06-032-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | on a literal constant. Obtained from: bde
* | | | Add a comment to note that bde supplied most, if not all,kargl2013-06-031-0/+2
| | | | | | | | | | | | | | | | of the optimizations.
* | | | ld80/s_expl.c:kargl2013-06-032-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * In the special case x = -Inf or -NaN, use a micro-optimization to eliminate the need to access u.xbits.man. * Fix an off-by-one for small arguments |x| < 0x1p-65. ld128/s_expl.c: * In the special case x = -Inf or -NaN, use a micro-optimization to eliminate the need to access u.xbits.manh and u.xbits.manl. * Fix an off-by-one for small arguments |x| < 0x1p-114. Obtained from: bde
* | | | ld80/s_expl.c:kargl2013-06-032-27/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update the evaluation of the polynomial. This allows the removal of the now unused variables t23 and t45. ld128/s_expl.c: * Update the evaluation of the polynomial and the intermediate result t. This update allows several numerical constants to be written as double rather than long double constants. Update the constants as appropriate. Obtained from: bde
* | | | Rename a few P2, P3, ... coefficients to A2, A3, ... missed inkargl2013-06-031-3/+3
| | | | | | | | | | | | | | | | my previous commit.
* | | | Update a comment to reflect that we are using an endpoint ofkargl2013-06-032-2/+2
| | | | | | | | | | | | | | | | an interval instead of a midpoint.
* | | | Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold,kargl2013-06-031-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | and use macros to access the e component of the unions. This allows the portions of the code in ld80 to be identical to the ld128 code. Obtained from: bde
* | | | Introduce the macro LOG2_INTERVAL, which is log2(number of intervals).kargl2013-06-032-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the macroi as a micro-optimization to convert a subtraction and division to a shift. Obtained from: bde
* | | | Whitespace.kargl2013-06-032-4/+4
| | | |
* | | | * Rename the polynomial coefficients from P2, P3, ... to A2, A3, ....kargl2013-06-032-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The names now coincide with the name used in PTP Tang's paper. * Rename the variable from s to tbl to better reflect that this is a table, and to be consistent with the naming scheme in s_exp2l.c Reviewed by: bde (as part of larger diff)
* | | | * Style(9). Start non-Copyright fancy formatted comments with /**.kargl2013-06-031-1/+1
| | | | | | | | | | | | | | | | Reviewed by: bde (as part of larger diff)
* | | | ld80/s_expl.c:kargl2013-06-032-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update Copyright years to include 2013. ld128/s_expl.c: * Correct and update Copyright years. This code originated from the ld80 version, so it should reflect the same time period. Reviewed by: bde (as part of larger diff)
* | | | Add libiconv based versions of *c16*() and *c32*().ed2013-06-037-3/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I initially thought wchar_t was locale independent, but this seems to be only the case on Linux. This means that we cannot depend on the *wc*() routines to implement *c16*() and *c32*(). Instead, use the Citrus libiconv that is part of libc. I'll see if there is anything I can do to make the existing functions somewhat useful in case the system is built without libiconv in the nearby future. If not, I'll simply remove the broken implementations. Reviewed by: jilles, gabor
* | | | Switch to 2-clause licenseemaste2013-06-031-6/+0
| | | | | | | | | | | | | | | | Approved by: bms@
* | | | Add logl, log2l, log10l, and log1pl.das2013-06-0311-18/+1809
| | | | | | | | | | | | | | | | Submitted by: bde
* | | | Since the cause of the problems with the __fillcontextx() waskib2013-06-031-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | identified, unify the code of check_deferred_signal() for all architectures, making the variant under #ifdef x86 common. Tested by: marius (sparc64) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* | | | Convert old make variable modifiers :U and :L to bmake :tu and :tl.tijl2013-06-023-3/+3
| | | | | | | | | | | | | | | | Reviewed by: sjg
* | | | dup(2): Clarify return value, in particular of dup2().jilles2013-05-311-4/+5
| | | |
* | | | sigaction(2): *at system calls are async-signal safe.jilles2013-05-311-0/+14
| | | |
* | | | sigaction(2): Extend description of async-signal safe functions:jilles2013-05-311-13/+108
| | | | | | | | | | | | | | | | | | | | * Improve description when unsafe functions are unsafe. * Add various safe functions from POSIX.1-2008 and Austin Group issue #692.
* | | | fork(2): Add information about fork() in multi-threaded processes.jilles2013-05-311-0/+12
| | | | | | | | | | | | | | | | | | | | There is nothing about pthread_atfork(3) or extensions like calling malloc(3) in the child process as this may be unreliable or broken.
* | | | fork(2): #include <sys/types.h> is not needed.jilles2013-05-311-2/+1
| | | |
* | | | MFV: libpcap 1.4.0.delphij2013-05-301-4/+16
| | | | | | | | | | | | | | | | MFC after: 4 weeks
* | | | Add __sync_synchronize().ed2013-05-302-0/+48
| | | | | | | | | | | | | | | | | | | | This function can easily be implemented on top of the mb() macro provided by <machine/atomic.h>.
* | | | Use #ifdef instead of #if defined.ed2013-05-302-2/+2
| | | | | | | | | | | | | | | | | | | | This makes these tests a bit more consistent with the tests done at the bottom of the file.
* | | | I'm happy to finally commit stephen@'s implementations of cacos,das2013-05-308-15/+1186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cacosh, casin, casinh, catan, and catanh. Thanks to stephen@ and bde@ for working on these. Submitted by: stephen@ Reviewed by: bde
* | | | Remove clause 3 and 4 from TNF licensesemaste2013-05-2913-91/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Per the NetBSD Foundation statement Third parties are encouraged to change the license on any files which have a 4-clause license contributed to the NetBSD Foundation to a 2-clause license.
* | | | Remove the advertising clause from the Regents of the University ofemaste2013-05-285-25/+5
| | | | | | | | | | | | | | | | California's license, per the letter dated July 22, 1999.
* | | | Renumber clauses to reduce diffs to other versionsemaste2013-05-28100-100/+100
| | | | | | | | | | | | | | | | | | | | NetBSD, OpenBSD, and Android's Bionic number the clauses 1 through 3, so follow suit to make comparison easier.
OpenPOWER on IntegriCloud