Commit Graph

14514 Commits

Author SHA1 Message Date
David Xu
a7b84c6512 In suspend_common(), don't wait for a thread which is in creation, because
pthread_suspend_all_np() may have already suspended its parent thread.
Add locking code in pthread_suspend_all_np() to only allow one thread
to suspend other threads, this eliminates a deadlock where two or more
threads try to suspend each others.
2012-08-27 03:09:39 +00:00
Dimitry Andric
15e154df01 Add libcxxrt's objects (prefixing them with cxxrt_ to avoid collisions)
to libc++.a and libc++_p.a, to make static linking of C++ executables
with libc++ easier.  This is similar to the approach used in libstdc++.

MFC after:	2 weeks
2012-08-25 13:15:44 +00:00
Dimitry Andric
5ea2b3b5db Sprinkle a bit of style.Makefile(5) across various clang Makefiles. No
functional changes.

MFC after:	3 days
2012-08-23 17:08:07 +00:00
David Xu
0aa81bff0b Eliminate redundant code, _thr_spinlock_init() has already been called
in init_private(), don't call it again in fork() wrapper.
2012-08-23 05:15:15 +00:00
Niclas Zeising
faf04960ff Add missing .Pp macro.
PR:		docs/170380
Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Approved by:	joel (mentor)
2012-08-21 16:35:14 +00:00
Joel Dahl
abf0999093 Remove trailing whitespace. 2012-08-21 13:33:48 +00:00
David Xu
9653e55f6a Add manual pages for clock_getcpuclockid and pthread_getcpuclockid. 2012-08-21 09:18:28 +00:00
David Xu
cdfe902650 Fix prototype. Also the function should return error code instead of
-1 on error.
2012-08-21 09:17:13 +00:00
Dimitry Andric
d4271816c7 Add three additional clang intrinsics headers, which I missed in the
previous import.
2012-08-20 20:56:40 +00:00
Dimitry Andric
7ae0e2c9f0 Upgrade our copy of llvm/clang to trunk r162107. With thanks to
Benjamin Kramer and Joerg Sonnenberger for their input and fixes.
2012-08-20 18:33:03 +00:00
Dimitry Andric
902a7b5298 Vendor import of llvm trunk r162107:
http://llvm.org/svn/llvm-project/llvm/trunk@162107
2012-08-19 10:31:50 +00:00
Stephen McKay
a0ebde2020 Correct a regression introduced during the import of file(1) 5.11.
Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored.  This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".

PR:		bin/170415
Approved by:	consensus on developers@
MFC after:	3 days
2012-08-17 02:27:17 +00:00
David Xu
d65f1abca7 Implement syscall clock_getcpuclockid2, so we can get a clock id
for process, thread or others we want to support.
Use the syscall to implement POSIX API clock_getcpuclock and
pthread_getcpuclockid.

PR:	168417
2012-08-17 02:26:31 +00:00
Kevin Lo
8437339e10 Make 'junk' volatile so that compilers won't be tempted to optimize
Reviewed by:	ache
MFC after:	3 days
2012-08-17 01:05:56 +00:00
Dimitry Andric
56d91b49b1 Vendor import of clang trunk r161861:
http://llvm.org/svn/llvm-project/cfe/trunk@161861
2012-08-15 20:02:54 +00:00
Dimitry Andric
58b69754af Vendor import of llvm trunk r161861:
http://llvm.org/svn/llvm-project/llvm/trunk@161861
2012-08-15 19:34:23 +00:00
Oleksandr Tymoshenko
8e585021b5 Merging of projects/armv6, part 2
Handle TLS for ARMv6 and ARMv7
2012-08-15 03:09:00 +00:00
Oleksandr Tymoshenko
89e757fe6f Merging of projects/armv6, part 2
Handle TLS for ARMv6 and ARMv7
2012-08-15 03:08:29 +00:00
Hans Petter Selasky
07b6ce3ba9 Add support for streams to LibUSB v2.0.
MFC after:	2 weeks
2012-08-13 18:10:52 +00:00
David Xu
aa75bc577a Do defered mutex wakeup once. 2012-08-12 00:56:56 +00:00
David Xu
e220a13ab9 MFp4:
Further decreases unexpected context switches by defering mutex wakeup
until internal sleep queue lock is released.
2012-08-11 23:17:02 +00:00
Dimitry Andric
f049a6cb4a Add __always_inline to __ieee754_rem_pio2() and __ieee754_rem_pio2f(),
since some older versions of gcc refuse to inline these otherwise.

Requested by:	bde
MFC after:	1 week
2012-08-11 15:47:22 +00:00
Ed Schouten
19c79bf86a Rename aux.c to auxv.c.
On Windows, AUX is the auxiliary device, usually pointing to COM1.
Therefore it is forbidden to create a file named aux.c. To make it a bit
easier for Windows users to check out our source code, rename this file
to auxv.c.

MFC after:	1 month
Discussed with:	kib
Suggested by:	Eric van Gyzen <eric vangyzen net>
2012-08-11 12:07:24 +00:00
Dimitry Andric
2b795b2921 Change a few extern inline functions in libm to static inline, since
they need to refer to static constants, which C99 does not allow for
extern inline functions.

While here, change a comment in e_rem_pio2f.c to mention the correct
number of bits.

Reviewed by:	bde
MFC after:	1 week
2012-08-11 11:13:48 +00:00
Jilles Tjoelker
9d8ca3b2ad nftw(): POSIX says directories causing loops should be silently skipped.
Formerly, loops caused nftw() to abort the traversal with ELOOP.
2012-08-09 22:05:40 +00:00
Xin LI
81b0715a13 Refresh with OpenBSD RCS ID changes to reflect that we now have essentionally
the same file.
2012-08-09 19:22:54 +00:00
Jilles Tjoelker
47875b0caa ftw(): Do not check the maxfds argument against OPEN_MAX.
Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this. POSIX does have a requirement on the
application that maxfds not exceed {OPEN_MAX}, but does not require the
implementation to check it ("may fail").

PR:		95239
2012-08-09 15:11:38 +00:00
Jilles Tjoelker
4d767dfea4 nftw(): Do not check the maxfds argument against OPEN_MAX.
Apart from the fact that nothing should have OPEN_MAX as a limit (as opposed
to RLIMIT_NOFILE from getrlimit() or _SC_OPEN_MAX from sysconf()), POSIX
does not require us to check this.

PR:		95239
Submitted by:	Todd Miller
2012-08-09 15:04:06 +00:00
Dimitry Andric
1843e23c48 Fix an instance in pam_krb5(8), where the variable 'user' could be used
uninitialized.

Found by:	clang 3.2
Reviewed by:	des
MFC after:	1 week
2012-08-06 18:44:59 +00:00
Dimitry Andric
2251b30757 Fix two instances in pam_krb5(8), where the variable 'princ_name' could
be used uninitialized.

Found by:	clang 3.2
Reviewed by:	des
MFC after:	1 week
2012-08-06 18:40:14 +00:00
Doug Rabson
957487515e Add an option for pam_krb5 to allow it to authenticate users which don't have
a local account.

PR:		76678
Submitted by:	daved at tamu.edu
MFC after:	2 weeks
2012-08-05 13:40:35 +00:00
Xin LI
0dfbbb3391 Use calloc(). 2012-08-01 00:21:55 +00:00
Steve Kargl
82b89f4850 ieeefp.h is only needed on i386 class hardware.
Submitted by:	bde
Approved by:	das (pre-approved)
2012-07-30 21:58:28 +00:00
Steve Kargl
ca50c4b871 Whitespace.
Submitted by:	bde
Approved by:	das (pre-approved)
2012-07-30 21:55:49 +00:00
Joel Dahl
76c9beff1b Remove trailing whitespace. 2012-07-30 21:02:44 +00:00
Isabell Long
ea91541917 Add more locale-specific functions to the relevant man pages and Makefile:
- lib/libc/locale/islower.3
  - lib/libc/locale/ispunct.3
  - lib/libc/locale/nl_langinfo.3
  - lib/libc/locale/isgraph.3
  - lib/libc/locale/isspace.3

Reviewed by:	bz
Approved by:	theraven
MFC after:	5 days
2012-07-30 20:56:19 +00:00
Martin Matuska
10ed66fdf8 Backport NFSv4 ACL fix from libarchive master branch.
Source:
https://github.com/libarchive/libarchive/commit/f67370d5

Obtained from:	libarchive (master branch)
2012-07-30 14:47:35 +00:00
Martin Matuska
27b0f55431 Catch up config_freebsd.h with libarchive 3.0.4 2012-07-29 06:34:45 +00:00
Martin Matuska
fd082e96c4 Update libarchive to 3.0.4 2012-07-28 06:38:44 +00:00
Ed Maste
cb75848307 Correct BUGS description of static buffer use
Since r142667 strerror has unconditionally returned a pointer to a
static buffer.

MFC after:	1 week
2012-07-27 21:38:14 +00:00
Konstantin Belousov
d5a53d996c Document F_DUP2FD_CLOEXEC.
MFC after:	1 week
2012-07-27 10:41:53 +00:00
Pedro F. Giffuni
8064706450 Drop non-portable libedit's el_data_set() and el_data_get() for
private data.

We can set/get private data with the documented el_get() and
el_set() so there's no need for our local extensions, which
never received much use anyway.

While here, also re-arrange the call to term_init_arrow. This
was left over from r89735 but is not required anymore.

This changes reduce differences against NetBSD's libedit.

MFC after:	2 months
2012-07-26 15:48:07 +00:00
Joel Dahl
a18f885152 Start manpage with Dd macro and also remove a trailing whitespace
while here.
2012-07-26 14:46:19 +00:00
Sergey Kandaurov
f6a6151849 Update the 'C1x draft' reference to '.St -isoC-2011' mdoc macro.
Reviewed by:	theraven
MFC after:	1 week
2012-07-26 12:04:11 +00:00
Steve Kargl
8345cbd275 Replace the macro name NUM with INTERVALS. This change provides
compatibility with the INTERVALS macro used in the soon-to-be-commmitted
expm1l() and someday-to-be-committed log*l() functions.

Add a comment into ld128/s_expl.c noting at gcc issue that was
deleted when rewriting ld80/e_expl.c as ld128/s_expl.c.

Requested by:	bde
Approved by:	das (mentor)
2012-07-26 04:05:08 +00:00
Steve Kargl
f7cfe68f59 * ld80/expl.c:
. Remove a few #ifdefs that should have been removed in the initial
    commit.
  . Sort fpmath.h to its rightful place.

* ld128/s_expl.c:
  . Replace EXPMASK with its actual value.
  . Sort fpmath.h to its rightful place.

Requested by:	bde
Approved by:	das (mentor)
2012-07-26 03:59:33 +00:00
Steve Kargl
3458a81e65 Replace code that toggles between 53 and 64 bits on i386
class hardware with the ENTERI and RETURNI macros, which
are now available in math_private.h.

Suggested by:	bde
Approved by: das (mentor)
2012-07-26 03:50:24 +00:00
Isabell Long
b3f18e536a Add a new man page containing details of new locale-specific functions for
wctype.h, iswalnum_l(3).  Add it and its functions to the Makefile.

Reviewed by:	gavin, jilles
Approved by:	theraven
MFC after:	5 days
2012-07-25 22:17:44 +00:00
Andrey A. Chernov
7066cac012 Don't ever build files depending on the directory where they are placed in.
It is obvious that its modification time will change with each such file
builded.
This bug cause whole libelf to rebuild itself each second make run
(and relink that files on each first make run) in the loop.
2012-07-24 16:03:28 +00:00
Steve Kargl
8a489dc248 Hook ld80/s_expl.c or ld128/s_expl.c into the building of libm.
PR: standards/152415
Approved by: das (mentor)
2012-07-23 19:23:49 +00:00