summaryrefslogtreecommitdiffstats
path: root/lib/libc
Commit message (Collapse)AuthorAgeFilesLines
* Return EBADF instead of EMFILE from dup2 when the second argument iseadler2012-04-112-7/+12
| | | | | | | | | | outside the range of valid file descriptors PR: kern/164970 Submitted by: Peter Jeremy <peterjeremy@acm.org> Reviewed by: jilles Approved by: cperciva MFC after: 1 week
* Do not restore the register holding the TLS pointer when doing variousnwhitehorn2012-04-116-6/+0
| | | | | | | | | | usermode context switches (long jumps and ucontext operations). If these are used across threads, multiple threads can end up with the same TLS base. Madness will then result. This makes behavior on PPC match that on x86 systems and on Linux. MFC after: 10 days
* - Return EPERM from ufs_setattr() when an user without PRIV_VFS_SYSFLAGSjh2012-04-101-3/+2
| | | | | | | | | privilege attempts to toggle SF_SETTABLE flags. - Use the '^' operator in the SF_SNAPSHOT anti-toggling check. Flags are now stored to ip->i_flags in one place after all checks. Submitted by: bde
* sem_open: Make sure to fail an O_CREAT|O_EXCL open, even if that semaphorejilles2012-04-091-4/+10
| | | | | | | | | | | | is already open in this process. If the named semaphore is already open, sem_open() only increments a reference count and did not take the flags into account (which otherwise happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL. PR: kern/166706 Reviewed by: davidxu MFC after: 10 days
* Unlike other functions __aeabi_read_tp function must preserve r1-r3. Theandrew2012-04-081-2/+5
| | | | | | | currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS using inline assembly. Approved by: imp (mentor)
* - Revert part of r234005, which I did not intend to commit.stas2012-04-071-1/+1
| | | | Sorry! :(
* - Add kernel config file for QEMU-emulated gumstix board.stas2012-04-071-1/+1
|
* Properly resolve the _ctx_start function descriptor (the symbol _ctx_startnwhitehorn2012-04-071-1/+1
| | | | | | | is a descriptor, not a code address), which prevents crashes when starting a context. This fixes QEMU on powerpc64. MFC after: 3 days
* mdoc: fix function type.joel2012-04-071-1/+1
|
* mdoc: fix column names, indentation, column separation within each row, andjoel2012-04-0711-96/+97
| | | | | | | quotation. Also make sure we have the same amount of columns in each row as the number of columns we specify in the head arguments. Reviewed by: brueffer
* In sem_post, the field _has_waiters is no longer used, because somedavidxu2012-04-051-16/+8
| | | | | | | application destroys semaphore after sem_wait returns. Just enter kernel to wake up sleeping threads, only update _has_waiters if it is safe. While here, check if the value exceed SEM_VALUE_MAX and return EOVERFLOW if this is true.
* Eliminate two cases of unwanted strncpy(). The name is not requireddelphij2012-04-022-4/+0
| | | | | | | | by the current code, and the results would get overwritten anyway by subsequent memset(). Reviewed by: ume MFC after: 1 month
* Remove unnecessary Xo/Xc.joel2012-03-291-10/+5
| | | | Reviewed by: brueffer
* mdoc: Ud takes no argument.joel2012-03-291-1/+1
|
* mandoc complains loudly when <TAB>s are misused in columnated lists. Fixjoel2012-03-296-50/+50
| | | | | this syntax violation and while I'm here also convert <TAB> to Ta and adjust quotation marks in order to prevent this problem in the future.
* Remove trailing whitespace per mdoc lint warningeadler2012-03-2939-112/+112
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Fix comment to specify correct struct name.jimharris2012-03-281-2/+2
| | | | | Reviewed by: gjb Approved by: sbruno
* Fix Fo arguments.joel2012-03-281-1/+1
| | | | Reviewed by: gabor
* mdoc: add missing El macro.joel2012-03-271-0/+2
|
* Minor indentation and paragraph nits.joel2012-03-271-4/+4
|
* Minor mdoc nit.joel2012-03-271-1/+1
|
* mdoc: correct .Bd/.Bl arguments.joel2012-03-262-7/+7
| | | | Reviewed by: brueffer
* mdoc: sort prologue macros.joel2012-03-263-3/+3
|
* mdoc: remove unknown macro.joel2012-03-262-2/+0
|
* mdoc: remove empty lines.joel2012-03-262-2/+0
|
* mdoc: terminate quoted strings.joel2012-03-261-1/+1
| | | | Reviewed by: brueffer
* Fix date.joel2012-03-261-1/+1
|
* mdoc: document title should be all caps.joel2012-03-251-1/+1
|
* Make sure sections are sorted into conventional order.joel2012-03-253-29/+29
|
* Remove superfluous paragraph macro.joel2012-03-2520-20/+0
|
* 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)
OpenPOWER on IntegriCloud