Commit Graph

9122 Commits

Author SHA1 Message Date
David Xu
4dd715ced2 Save cancelflags in signal frame, this fixes a problem that
a thread in pthread_cond_wait handled a signal can no longer
be canceled.

Reviewed by: deischen
2004-11-01 10:49:34 +00:00
Brian Feldman
64926afd50 Make pthread_mutex_trylock(3) return EBUSY on failure, as all software
packages expect and seems to be most correct according to the slightly-
ambiguous standards.

MFC after:		1 month
Corroborated by:	POSIX <http://tinyurl.com/4uvub>
Reviewed by: 		silence on threads@
2004-10-31 05:03:50 +00:00
Marcel Moolenaar
a1107cc375 Don't barf when we encounter an UUID for GPT partitions. Instead, add
the GPT partition on i386 and adm64 as type=gpt, subtype=0 and with the
sname set to the UUID. This prevents sysinstall from bombing out. This
also makes sure the GPT partition shows up in sysinstall so as to avoid
accidental "clobberage".

PR:	bin/72896
2004-10-31 01:28:59 +00:00
Peter Wemm
66e1a311f5 Fix brk(3). The stack was unbalanced when we jumped to cerror. Oops!
This causes nasty things like SEGV or a cpu spin when we return.

Submitted by: "James R. Van Artsalen" <james@jrv.org>
2004-10-27 17:11:43 +00:00
Ceri Davies
47c01d89b4 Add necessary whitespace to correct cross references.
PR:		docs/73193
Submitted by:	Jilles Tjoelker <jilles at stack.nl>
2004-10-27 11:26:51 +00:00
Tim Kientzle
6b31624278 Allow tar format to read and accept an empty (or non-existent)
file.  In particular, this allows bsdtar to append (-r) to
an empty file.

Thanks to: Ryan Sommers

While I'm here, straighten out a misleading comment about GNU-compatible
sparse file handling.
2004-10-27 05:15:23 +00:00
Yaroslav Tykhiy
a39fd5061b Reword the last change a bit, add mdoc(7) markup.
Discussed with:	bde
2004-10-25 13:35:03 +00:00
Ruslan Ermilov
6ef8c2e5c6 For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:46:50 +00:00
Ruslan Ermilov
a35d88931c For variables that are only checked with defined(), don't provide
any fake value.
2004-10-24 15:33:08 +00:00
Ruslan Ermilov
7475b21fcc -O2 compile isn't quite ready for WARNS=2 yet. 2004-10-24 10:42:15 +00:00
David Xu
fca6ccde6e Check unhandled signals before thread marks itself as DEAD,
this reduces chances of signal losting problem found by
Peter Holm <peter@holm.cc>
2004-10-23 23:37:54 +00:00
David Xu
b4f9f84b96 1. Move thread list flags into new separate member, and atomically
put DEAD thread on GC list, this closes a race between pthread_join
   and thr_cleanup.
2. Introduce a mutex to protect tcb initialization, tls allocation and
   deallocation code in rtld seems no lock protection or it is broken,
   under stress testing, memory is corrupted.

Reviewed by: deischen
patch partly provided by: deischen
2004-10-23 23:28:36 +00:00
Robert Watson
f4194603ce Modify libugidfw(3) to use MBI_* permission flags from mac_bsdextended.h
instead of using the V* permission flags from vnode.h.  Remove include
of vnode.h.

Requested by:	phk
2004-10-21 11:21:13 +00:00
David Xu
39454d368f Decrease reference count if we won't use the thread, this avoids memory
leak under some cases.
2004-10-21 03:42:24 +00:00
David E. O'Brien
a152ca4f14 libsmb is now WARNS 2 clean on 64-bit platforms. 2004-10-19 18:07:26 +00:00
David E. O'Brien
ec27f11411 style.Makefile(5) 2004-10-19 18:06:29 +00:00
Ruslan Ermilov
6bd0a54ae4 uniq(1) is not an install tool, and using it was causing
"uniq: not found" during the installworld.

Spotted by:	Roman Neuhauser
2004-10-18 22:18:23 +00:00
David E. O'Brien
62f696fcfa Sync with sys/i386/include/endian.h: use the single instruction 'bswap'. 2004-10-18 17:19:36 +00:00
Ruslan Ermilov
1c9c8d506f Replaced afterinstall: with FILES. 2004-10-18 16:26:25 +00:00
Yaroslav Tykhiy
017aaf79e1 Since sendfile(2) works on regular files only,
which have no negative offsets, "negative" and
"invalid" are equivalent WRT the offset argument.

Suggested by:	bde
2004-10-18 10:02:04 +00:00
Tim Kientzle
d4ddb4f67f Revert 1.18: It broke Athlon64 builds, which
probably means it also requires a .so version
bump.  Defer it until I finish some related
work on cleaning up error returns throughout
the library.

Thanks to: Conrad J. Sabatier
2004-10-18 05:31:01 +00:00
Tim Kientzle
ccd736423f Use STDERR_FILENO instead of 2, as POSIX intended.
Thanks to: Alfred Perlstein
2004-10-18 04:34:30 +00:00
Andrey A. Chernov
27ecbe8a77 Remove setrunelocale() 2004-10-18 02:06:18 +00:00
Tim Kientzle
227b756897 Correctly report write errors from the lowest-level
output routines back to the compression layer.
2004-10-17 23:47:30 +00:00
Tim Kientzle
5255e61f1a Refine the error-checking and reporting in the
"compress" format decompression code.  In particular,
distinguish between EOF and fatal data errors.
2004-10-17 23:40:10 +00:00
Tim Kientzle
cc11275dd4 Correct the return type of archive_write_data
to match the documentation.

MFC after: 30 days
2004-10-17 23:37:09 +00:00
Tim Kientzle
49f89e883c Don't rely on stdio here. 2004-10-17 23:35:16 +00:00
Alfred Perlstein
af2e24d782 Document EMSGSIZE return from recvmsg due to insufficient free files
when transfering rights (file descriptors.)
2004-10-17 07:13:34 +00:00
Tim J. Robbins
31d330fb2a Remove the obsolete <rune.h> interface. 2004-10-17 06:51:50 +00:00
Tim J. Robbins
79a3948997 Remove support for the obsolete UTF2 encoding. 2004-10-17 02:29:15 +00:00
Tim J. Robbins
6bc2b4b7db Bump the libc major version number to 6. 2004-10-17 01:52:48 +00:00
Stefan Farfeleder
df103a1515 Document that the length modifier l is ignored for floating point
conversion specifiers (a, A, e, E, f, F, g and G).
2004-10-16 16:00:01 +00:00
Yaroslav Tykhiy
9a0cabd9e4 Explain it is a negative offset that EINVAL may indicate.
Now readers won't get an impression that pointing to beyond
the current end of file will result in EINVAL.

MFC after:	1 week
2004-10-16 09:53:35 +00:00
Yaroslav Tykhiy
6def5837f5 Improve mdoc(7) markup. 2004-10-16 09:46:38 +00:00
Yaroslav Tykhiy
fc5cfaae79 Give details on what will happen if the `offset' argument
to sendfile(2) falls beyond the end of file.

Touch .Dd.

PR:		bin/72649 (in the audit trail)
MFC after:	1 week
2004-10-16 09:39:25 +00:00
David E. O'Brien
a9bdcd3711 Enable building with LIBC_SCCS defined.
Bug submitted by:	Andrea Campi <andrea+freebsd_current@webcom.it>
2004-10-16 06:32:43 +00:00
David E. O'Brien
a986ef5788 Try to bring some sanity to the SCM ID's.
+ spell LIBC_SCCS consistently
+ enable builds with LIBC_SCCS defined to not syntax error
+ minor SCM reformatting to try to have some consistency
2004-10-16 06:11:35 +00:00
Stefan Farfeleder
d749cd6f7c Remove extra closing parenthesis added in revision 1.4.
Noticed by:	Andrea Campi
2004-10-14 21:31:42 +00:00
Mike Makonnen
5dbd7addb0 1. Now that it's a thread's state is changed from within the kernel, where
no userland locks are heald, the dead thread lock can no longer protect
   access to it. Therefore, instead of using an if (!dead)...else clause
   after walking the active threads list test the thread pointer before
   deciding not to walk the dead threads list. If the thread pointer is null
   it means it was not found in the active threads list and the dead threads
   list should be checked.

2. Do not free the stack of a thread that is not marked dead. This is the
   2nd and final part of eliminating the race to free a thread's stack.

MFC after: 3 days
2004-10-13 11:42:20 +00:00
Giorgos Keramidas
4bf94cc1f7 Correctly document the return value of strerror() and strerror_r() and
the contents of the returned buffer for unknown error codes.

PR:		docs/72578
Submitted by:	Jilles Tjoelker <jilles@stack.nl>
MFC after:	3 days
2004-10-12 14:52:52 +00:00
David E. O'Brien
731239920f Build as a shared lib again.
Discussed with:	kientzle
2004-10-11 22:04:05 +00:00
Peter Wemm
2bdd560907 Belatedly catch up with the dev_t/cdev changes from a few months back.
Extract the struct cdev pointer and the tty device from inside rather than
incorrectly casting the 'struct cdev *' pointer to a 'dev_t' int.  Not
that this was particularly important since it was only used for reading
vmcore files.
2004-10-11 21:56:27 +00:00
David Schultz
dbc8f2b5ce More updates for math(3):
- Make some minor rearrangements in the introduction.
- Mention the problem with argument reduction on i386.
- Add recently-implemented functions to the table.
- Un-document the error bounds that only apply to the old 4BSD math
  library, and fill in the correct values where I know them.  No
  attempt has been made to document bounds lower than 1 ulp, although
  smaller bounds are usually achievable in round-to-nearest mode.
2004-10-11 20:13:52 +00:00
Stefan Farfeleder
2fd3a32ee1 Add and document ilogbl(), a long double version of ilogb(). 2004-10-11 18:13:52 +00:00
Stefan Farfeleder
552ebda9dd Use the FP_ILOG macros from <math.h> rather than hardcoded return values.
Also be prepared for FP_ILOGBNAN != INT_MAX.

Reviewed by:	md5
2004-10-09 17:14:28 +00:00
Maxim Konovalov
e2494b93fc o Backout rev. 1.16, see 1.3 commit log for more info.
Requested by:	bde

o Remove unneeded sys/types.h and netinet/in.h from the synopsis and
the example.
o We do have struct in_addr in arpa/inet.h, so no need for netinet/in.h.
o Mention where AF_* constants defined are.

Educated by:	bde
2004-10-09 17:13:58 +00:00
Giorgos Keramidas
c084d183ed Delete a .Fn that had no argument and
properly terminate a .Bl with a matching .El

MFC after:	3 days
2004-10-09 04:03:08 +00:00
David Xu
42c7735ce5 if system scope thread didn't set timeout, don't call clock_gettime syscall
before and after sleeping.

Reviewed by: deischen
2004-10-08 22:57:30 +00:00
Gleb Smirnoff
2e89951b6f When send()ing to syslogd return ENOBUFS keep trying until success.
This fixes a case, when DoSed syslogd completely loses messages.

PR:		bin/72366
Discussed with:	dwmalone, millert@OpenBSD.org
Approved by:	julian (mentor)
Obtained from:	OpenBSD (rev. 1.17, 1.21 by millert)
MFC after:	3 months
2004-10-08 21:15:21 +00:00
Julian Elischer
599e7243d3 Make less wrong for desciptions of signal handling
MFC in: 1 week
2004-10-08 20:40:30 +00:00