summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Make utmpx(3) thread safe if we support TLS.ed2012-03-232-0/+9
| | | | | | Because the utmpx interface is generally not required to be thread-safe, but it is nice to have, if easy to do so. Therefore don't make a mess out of the code and only use it if __NO_TLS is not defined.
* Fix style. Somehow I managed to lost a space when copy&paste.pluknet2012-03-221-1/+1
| | | | Pointed out by: stefanf
* Prevent fs_file NULL pointer dereference in fixfsfile() uncovered after r1.5pluknet2012-03-221-1/+1
| | | | | | when passing damaged user-supplied fstab file data. MFC after: 1 week
* Revert previous change. It is an incomplete change from old branch. :-(davidxu2012-03-211-60/+39
|
* Use version 2 of semaphore provided by kernel umtx code, now if there isdavidxu2012-03-211-39/+60
| | | | | | | no waiters, we still increase and decrease count in user mode without entering kernel, once there is a waiter, sem_post will enter kernel to increase count and wake thread up, this is atomicy and allow us to gracefully destroy semaphore after sem_wait returned.
* Make __get_locale() static inline, not just inline, so when compiling libc intheraven2012-03-191-1/+1
| | | | | | debug mode (without optimisations) it doesn't generate a linker failure. Approved by: dim (mentor)
* Remove trailing whitespace.bjk2012-03-191-2/+2
| | | | Approved by: hrs (mentor)
* Expound a bit more about the system maximum number of FIBs,bjk2012-03-191-2/+20
| | | | | | | | how it may be set, and current limitations on the value. Approved by: hrs (mentor) PR: docs/157453 MFC after: 1 week
* draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007eadler2012-03-191-1/+1
| | | | | | | | PR: docs/163771 Submitted by: phk Reviewed by: If someone else reviewed your modification. Approved by: cperciva MFC after: 1 week
* fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on the returnedjilles2012-03-181-2/+5
| | | | | | | | | | | pathnames. With the current API (no *at functions), FTS_NOCHDIR requires that the fts_accpath start with the original path passed to fts_open(); therefore, the depth that can be reached is limited by the {PATH_MAX} constraint on this pathname. MFC after: 1 week
* fts(3): Document cases where FTS_NOCHDIR is set implicitly.jilles2012-03-181-1/+11
| | | | | | PR: docs/166091 Submitted by: Matthew Story MFC after: 1 week
* Unbreak trhe build by including proper headergonzo2012-03-181-1/+1
|
* Fix TLS for statically linked binariesgonzo2012-03-181-0/+4
| | | | Approved by: cognet
* Do not claim that msync(2) is obsoleted [1].kib2012-03-172-4/+7
| | | | | | | | Document EIO from msync(2). Inspired by PR: docs/165929 [1] Reviewed by: jilles MFC after: 2 weeks
* Remove non-existing error condition.ed2012-03-151-4/+1
| | | | | | | | Just like kill(2), it is impossible for killpg(0, ...) to fail with ESRCH, as a process always has a process group. Discussed on: arch@ MFC after: 1 week
* Extend the description for ESRCH a bit.ed2012-03-151-1/+1
| | | | | | | | This errno can also be returned if the passed process identifier doesn't correspond with a process group. Discussed on: arch@ MFC after: 1 week
* Remove impossible error condition from the man page.ed2012-03-151-4/+1
| | | | | | | | | On FreeBSD, all processes have a process group, so it is impossible for kill(2) to fail this way. POSIX also doesn't mention this error condition. Discussed on: arch@ MFC after: 3 weeks
* Fix indentation.kib2012-03-141-1/+1
| | | | MFC after: 3 days
* First set of xlocale man pages. More to follow...theraven2012-03-1310-2/+223
| | | | Approved by: dim (mentor)
* More xlocale cleanups.theraven2012-03-131-0/+4
| | | | Approved by: dim (mentor)
* Cross-reference sigqueue(2) and kill(2).trasz2012-03-102-2/+4
|
* Fix build of libc.so after r232620. This caused a duplicate definitiondim2012-03-061-0/+6
| | | | | | of __getCurrentRuneLocale(). Pointy hat to: me
* Remove some duplicated copyright notices.theraven2012-03-062-10/+0
| | | | Approved by: dim (mentor)
* - Switch ARM and MIPS to TLS Variant Igonzo2012-03-061-3/+10
| | | | | | - Fix TLS allocation for Variant I: both rtld and libc allocators assume that tls_static_space includes space for TLS structure. So increment calculated static size by the size of it.
* Implement _set_tpgonzo2012-03-061-0/+4
|
* Link EV_SET(3) to kqueue(2).pjd2012-03-051-1/+1
| | | | MFC after: 3 days
* Remove outdated comment of seven yearseadler2012-03-041-7/+0
| | | | | | PR: docs/116116 Approved by: cperciva MFC after: 1 week
* Remove reference to gcc's non-standard -fwritable-strings, whicheadler2012-03-041-7/+1
| | | | | | | | | doesn't exist in recent releases (and is bad advice anyway) PR: docs/163119 Submitted by: Yuri Pankov <yuri.pankov@gmail.com> Approved by: cperciva MFC after: 1 week
* POSIX mandates that swab do nothing when len < 0eadler2012-03-042-1/+6
| | | | | | | PR: kern/140690 Submitted by: Jeremy Huddleston <jeremyhu@apple.com> Approved by: cperciva MFC after: 2 weeks
* Reapply 227753 (xlocale cleanup), plus some fixes so that it passes buildtheraven2012-03-045-29/+115
| | | | | | universe with gcc. Approved by: dim (mentor)
* Add __aeabi_read_tp to the symbol list.cognet2012-03-041-0/+1
|
* Removed excessive _seekdir() call in closedir(). This saves one lseek()ru2012-03-021-3/+1
| | | | | | | | | | | | | | | syscall. Before r5958, seekdir() was called for its side effect of freeing memory allocated by opendir() for rewinddir(), but that revision added _reclaim_telldir() that frees all memory allocated by telldir() calls, making this call redundant. This introduces a slight change. If an application duplicated the descriptor obtained through dirfd(), it can no longer rely on file position to be reset to the start of file after a call to closedir(). It's believed to be safe because neither POSIX, nor any other OS I've tested (NetBSD, Linux, OS X) rewind the file offset pointer on closedir(). Reported by: Igor Sysoev
* Belatedly add dl_iterate_phdr(3) to the list of installed manpages.kib2012-03-021-1/+1
| | | | MFC after: 3 days
* Finally removed the stat() and fstat() calls from the opendir() code.ru2012-03-021-24/+14
| | | | | | | | | | | They were made excessive in r205424 by opening with O_DIRECTORY. Also eliminated the fcntl() call used to set FD_CLOEXEC by opening with O_CLOEXEC. (fdopendir() still checks that the passed descriptor is a directory, and sets FD_CLOEXEC on it.) Reviewed by: ed
* Note that memory should be freed after uuid_to_string(3) call.ae2012-03-011-2/+11
| | | | MFC after: 1 week
* Document SO_PROTOCOL socket option.kib2012-02-261-2/+13
| | | | | | Discussed with: bz Reviewed by: glebius MFC after: 2 weeks
* Whitespace cleanup:gjb2012-02-251-1/+2
| | | | | | | | | o Wrap sentences on to new lines o Cleanup trailing whitespace Found with: textproc/igor MFC after: 1 week X-MFC-With: r232157
* Fix various typos in manual pages.gjb2012-02-254-8/+8
| | | | | | Submitted by: amdmi3 PR: 165431 MFC after: 1 week
* In revision 231989, we pass a 16-bit clock ID into kernel, howeverdavidxu2012-02-252-21/+32
| | | | | | | | | | | | according to POSIX document, the clock ID may be dynamically allocated, it unlikely will be in 64K forever. To make it future compatible, we pack all timeout information into a new structure called _umtx_time, and use fourth argument as a size indication, a zero means it is old code using timespec as timeout value, but the new structure also includes flags and a clock ID, so the size argument is different than before, and it is non-zero. With this change, it is possible that a thread can sleep on any supported clock, though current kernel code does not have such a POSIX clock driver system.
* libc: Eliminate some relative relocations in fmtmsg().jilles2012-02-221-7/+7
|
* Document the fact that getgrouplist(3) returns 0 on success.pjd2012-02-201-2/+2
| | | | MFC after: 3 days
* Document PL_FLAG_CHILD.kib2012-02-181-1/+6
| | | | MFC after: 3 days
* Use ANSI prototypes.delphij2012-02-181-42/+13
|
* Fix cross-references.kib2012-02-171-2/+2
| | | | | Submitted by: pluknet MFC after: 2 weeks
* Document dl_iterate_phdr(3).kib2012-02-171-0/+115
| | | | | | | Man page is based on the OpenBSD version, extended and corrected for the FreeBSD implementation. MFC after: 2 weeks
* Fetch the aux vector for the static libc, and use the entries tokib2012-02-173-5/+89
| | | | | | | | | | | | | | initialize the cache of the system information as it was done for the dynamic libc. This removes several sysctls from the static binary startup. Use the aux vector to fill the single struct dl_phdr_info describing the static binary itself, to implement dl_iterate_phdr(3) for the static binaries. [1] Based on the submission by: John Marino <draco marino st> [1] Tested by: flo (sparc64) MFC after: 2 weeks
* Add err(3) to strerror(3) SEE ALSO sectioneadler2012-02-161-0/+1
| | | | | | | PR: docs/164940 Submitted by: Niclas Zeising <zeising@daemonic.se> Approved by: cperciva MFC after: 3 days
* Bump .Dd date for previous revision.delphij2012-02-151-1/+1
|
* Add notes about sigev_notify_kevent_flags introduced in revision 230857davidxu2012-02-151-0/+3
| | | | | | which enables thread-friendly polling on same fd for AIO events. Reviewed by: delphij
* Revert r231673 and r231682 for now, until we can run a full makedim2012-02-145-115/+29
| | | | | | universe with them. Sorry for the breakage. Pointy hat to: me and brooks
OpenPOWER on IntegriCloud