summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-0840-46/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* mdoc: fix manlint warnings by unbreaking mdoc syntaxuqs2010-10-081-1/+1
|
* Oops, don't remove -fexceptions flag.davidxu2010-10-081-0/+1
|
* unwind.h was imported, gcc directory is no longer needed.davidxu2010-10-081-1/+0
|
* Upgrade Clang and LLVM to the 2.8 release. See here for release notes:dim2010-10-071-2/+2
| | | | | | http://llvm.org/releases/2.8/docs/ReleaseNotes.html Approved by: rpaulo (mentor)
* Missed space.kib2010-10-061-1/+1
| | | | | Submitted by: brueffer MFC after: 1 week
* Add cross-references to lrand48(3) and arc4random(3) from rand(3)kib2010-10-062-1/+11
| | | | | | | and random(3). Submitted by: Valentin Nechayev <netch netch kiev ua> MFC after: 1 week
* When no protocol entry is found, getproto*_r(3) shouldume2010-10-053-3/+3
| | | | | | | return zero. Spotted by: Kostik Belousov <kostikbel__at__gmail.com> MFC after: 2 weeks
* Handle null return from XML_ParserCreate and fix a few memory leaks onemaste2010-10-051-4/+10
| | | | | | | error conditions. Submitted by: Mark Johnston <mjohnston at sandvine dot com> MFC after: 2 weeks
* Change libvgl's set4pixels() and set2lines() functions from plaindim2010-10-041-4/+4
| | | | | | | | | | | | 'inline' to 'static inline'. Otherwise, a C99 compiler (such as clang) will output an undefined symbol for those functions in the resulting object file. (Even gcc will do this, when you use "-std=c99".) This should fix the "undefined reference to `set4pixels'" errors that some people were seeing during ports building, when their world was compiled with clang. Approved by: rpaulo (mentor)
* Clear errno for each method dispatch.ume2010-10-041-0/+2
| | | | | Spotted by: Kostik Belousov <kostikbel__at__gmail.com> MFC after: 2 weeks
* Fix punctuation and grammar, mostly by ending sentences with a period.gnn2010-10-042-33/+33
| | | | MFC after: 1 day
* Use __FBSDID() instead of RCSID() in most .S files under lib/msun/i386,dim2010-10-0121-42/+21
| | | | | | | | and one under lib/msun/amd64. This avoids adding the identifiers to the .text section, and moves them to the .comment section instead. Suggested by: bde Approved by: rpaulo (mentor)
* libc: Remove the i386 assembler version of strlen(3).jilles2010-10-012-55/+1
| | | | | | | | | | | | | On anything modern, the C version, which processes a word at a time, is much faster. The Intel optimization manual explicitly warns against using REP prefixes with SCAS or CMPS, which is exactly what the assembler version does. A simple test on a Phenom II showed the C version, compiled with -O2, to be about twice as fast determining the length of 100000 strings between 0 and 255 bytes long. MFC after: 2 weeks
* Retire the amd64 and i386 specific inline assembly versions of ldexp.c,dim2010-09-302-136/+0
| | | | | | | | as they are slower than the generic version in C, at least on modern hardware. This leaves us with just five implementations. Suggested by: bde Approved by: rpaulo (mentor)
* change code to use unwind.h.davidxu2010-09-302-5/+6
|
* Apply the same workaround for clang to amd64's version of ldexp.c (as indim2010-09-291-3/+9
| | | | | | | | | | | | | r212976): order the incoming arguments to fscale as st(0), st(1), and mark temp2 volatile (only in case of compilation with clang) to force clang to pop it correctly. No binary change when compiled with gcc. This fixes ldexp() when compiled with clang on amd64, which makes drand48() and friends work correctly again, and this in turn fixes perl's tempfile(). Reported by: Renato Botelho, Derek Tattersall Approved by: rpaulo (mentor)
* Check invalid mutex in _mutex_cv_unlock.davidxu2010-09-291-0/+6
|
* In current code, statically initialized and destroyed object havedavidxu2010-09-285-195/+160
| | | | | | | | same null value, the code can not distinguish between them, to fix the problem, now a destroyed object is assigned to a non-null value, and it will be rejected by some pthread functions. PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP is changed to number 1, so that adaptive mutex can be statically initialized correctly.
* Increase maximum network timeout from 20s to 120s. Given that an ETIMEDOUTemaste2010-09-281-1/+1
| | | | | return from sendrecv probably means a failure to boot we might as well be generous in the timeout period.
* Report death event to debugger before moving to gc list, otherwisedavidxu2010-09-261-3/+2
| | | | debugger may can not find it on thread list.
* Only access unwind_disabled when _PTHREAD_FORCED_UNWIND is defined.davidxu2010-09-251-1/+2
|
* Add missing field.davidxu2010-09-251-0/+1
|
* Because old _pthread_cleanup_push/pop do not have frame address,davidxu2010-09-252-13/+17
| | | | | | it is incompatible with stack unwinding code, if they are invoked, disable stack unwinding for current thread, and when thread is exiting, print a warning message.
* Simplify code, and in while loop, fix operator to match the unwindingdavidxu2010-09-251-7/+4
| | | | direction.
* To support stack unwinding for cancellation points, add -fexceptions flagdavidxu2010-09-2514-72/+75
| | | | | | | for them, two functions _pthread_cancel_enter and _pthread_cancel_leave are added to let thread enter and leave a cancellation point, it also makes it possible that other functions can be cancellation points in libraries without having to be rewritten in libthr.
* inline testcancel() into thr_cancel_leave(), because cancel_pending isdavidxu2010-09-241-2/+3
| | | | almost false, this makes a slight better branch predicting.
* In most cases, cancel_point and cancel_async needn't be checked again,davidxu2010-09-243-5/+3
| | | | because cancellation is almostly checked at cancellation points.
* Add the following Linux BlueZ compatibility macros: htobs(), htobl(),emax2010-09-221-0/+4
| | | | | | | | btohs() and btohl() PR: kern/136386 Submitted by: Monty Hall < kungfu_disciple at sbcglobal dot net > MFC after: 1 week
* Workaround LLVM bug #4434:rpaulo2010-09-211-3/+7
| | | | | | | | | | Reorder inline assembly arguments temp2, temp, value and texp to follow the st(0), st(1), etc. style. Also mark the temp2 variable as volatile to workaround another clang bug. This allows clang to buildworld FreeBSD/i386. Submitted by: dim
* Fix exec_imgact_shell()'s handling of two error cases: (1) Previously, ifalc2010-09-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | the first line of a script exceeded MAXSHELLCMDLEN characters, then exec_imgact_shell() silently truncated the line and passed on the truncated interpreter name or argument. Now, exec_imgact_shell() will fail and return ENOEXEC, which is the commonly used errno among Unix variants for this type of error. (2) Previously, exec_imgact_shell()'s check on the length of the interpreter's name was ineffective. In other words, exec_imgact_shell() could not possibly fail and return ENAMETOOLONG. The reason being that the length of the interpreter name had to exceed MAXSHELLCMDLEN characters in order that ENAMETOOLONG be returned. But, the search for the end of the interpreter name stops after at most MAXSHELLCMDLEN - 2 characters are scanned. (In the end, this particular error is eventually discovered outside of exec_imgact_shell() and ENAMETOOLONG is returned. So, the real effect of this second change is that the error is detected earlier, in exec_imgact_shell().) Update the definition of MAXINTERP to the actual limit on the size of the interpreter name that has been in effect since r142453 (from 2005). In collaboration with: kib
* If we are at cancellation point, always work as deferred mode despitedavidxu2010-09-211-34/+32
| | | | | | whether asynchronous mode is turned on or not, this always gives us a chance to decide whether thread should be canceled or not in cancellation points.
* First step at adopting FreeBSD to support PSARC/2010/029. This makestrasz2010-09-201-6/+26
| | | | | | acl_is_trivial_np(3) properly recognize the new trivial ACLs. From the user point of view, that means "ls -l" no longer shows plus signs for all the files when running ZFS v28.
*-. Upgrade our Clang in base to r114020, from upstream's release_28 branch.dim2010-09-2043-86/+260
|\ \ | | | | | | | | | Approved-by: rpaulo (mentor)
| | * Vendor import of clang r114020 (from the release_28 branch):dim2010-09-17302-29014/+39303
| | | | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/branches/release_28@114020 Approved by: rpaulo (mentor)
| | * Make vendor/clang/dist exactly the same as upstream's r108428. Somedim2010-09-162-878/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files and directories were already added/removed in the upstream repository, but were not added/removed here, when the previous snapshot was imported. Note: I did not import the file test/Lexer/conflict-marker.c, because it contains merge conflict markers on purpose, which upsets our pre-commit hooks. Approved by: rpaulo (mentor)
| * | Vendor import of llvm r114020 (from the release_28 branch):dim2010-09-17566-18511/+32107
| | | | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/llvm/branches/release_28@114020 Approved by: rpaulo (mentor)
* | | In all Makefiles under lib/clang, consistently use tabs instead ofdim2010-09-198-8/+8
| | | | | | | | | | | | | | | | | | spaces after the '=' sign in macro assignments. Approved-by: rpaulo (mentor)
* | | Because atfork lock is held while forking, a thread cancellation triggereddavidxu2010-09-194-12/+13
| | | | | | | | | | | | by atfork handler is unsafe, use intenal flag no_cancel to disable it.
* | | Fix typo.davidxu2010-09-191-1/+1
| | |
* | | - _Unwind_Resume function is not used, remove it.davidxu2010-09-191-14/+8
| | | | | | | | | | | | | | | | | | - Use a store barrier to make sure uwl_forcedunwind is lastest thing other threads can see. - Add some comments.
* | | Fix a race condition when finding stack unwinding functions.davidxu2010-09-191-7/+20
| | |
* | | Ignore EINTR when calling waitpid.rpaulo2010-09-181-1/+2
| | |
* | | add code to support stack unwinding when thread exits. note that onlydavidxu2010-09-156-1/+184
| | | | | | | | | | | | | | | | | | defer-mode cancellation works, asynchrnous mode does not work because it lacks of libuwind's support. stack unwinding is not enabled unless LIBTHR_UNWIND_STACK is defined in Makefile.
* | | Move back IN_GCLIST flag into field tlflags, since thread list and gc listdavidxu2010-09-151-6/+6
| | | | | | | | | | | | still share same lock.
* | | Don't compare thread pointers again.davidxu2010-09-131-3/+3
| | |
* | | Fix copy&paste problem.davidxu2010-09-131-2/+2
| | |
* | | Update symbol.davidxu2010-09-131-1/+1
| | |
* | | PS_DEAD state needs not be checked because _thr_find_thread() has alreadydavidxu2010-09-131-4/+0
| | | | | | | | | | | | checked it.
* | | Convert thread list lock from mutex to rwlock.davidxu2010-09-1315-129/+153
| | |
OpenPOWER on IntegriCloud