Commit Graph

10714 Commits

Author SHA1 Message Date
julian
2df2fdd630 remove already commented out code 2006-12-06 06:44:20 +00:00
davidxu
33168bd24f test cancel_pending to save a thr_wake call in some specical cases. 2006-12-06 00:15:35 +00:00
davidxu
b01e86cf0a _thr_ucond_wait drops lock, we should pick it up again. 2006-12-05 23:46:11 +00:00
davidxu
3f73376426 the c_has_waiters is lazily updated, temporarily disable the false
alarm code.
2006-12-05 07:23:58 +00:00
davidxu
f26900460b Use ucond to implement barrier. 2006-12-05 06:54:25 +00:00
davidxu
f1f5293365 Add _thr_ucond_init(). 2006-12-05 06:53:44 +00:00
davidxu
19c999e75f Tweak _thr_cancel_leave_defer a bit to fix a possible race. 2006-12-05 05:01:57 +00:00
ru
f1573baff3 Grammar.
OK'ed by:	sam
2006-12-04 20:34:25 +00:00
sam
6f9b2bd1bc document recent change to return ECONNRESET for tcp sockets
MFC after:	1 month
2006-12-04 18:39:11 +00:00
ume
6c74892876 Use _kevent() instead of kevent().
Requested by:	nork
2006-12-04 17:08:43 +00:00
davidxu
5ad129a10a Fix typo, I was using a wrong header file, and the typo is not detected
by compiler.
2006-12-04 14:27:42 +00:00
davidxu
cbb0fd8174 Use kernel provided userspace condition variable to implement pthread
condition variable.
2006-12-04 14:20:41 +00:00
kientzle
a2cced1272 Argh. Restore a stat() call that was erroneously removed.
Thanks to: WATANABE, Kazuo
Pointy hat: me, from the handy dispenser I keep nearby.
2006-12-04 08:01:53 +00:00
dds
782cf0f37f Minor clarification. 2006-12-03 19:26:17 +00:00
maxim
520a9a218b o As POSIX requires confstr(3) returns zero on errors, not -1.
PR:		misc/106234
Submitted by:	Guy Harris
MFC after:	1 week
2006-12-03 08:22:36 +00:00
davidxu
61e0842016 If a thread was detached, return EINVAL instead, the error code
is also returned by pthread_detach() if a thread was already
detached, the error code was already documented:

>    [EINVAL]	The implementation has detected that the value speci-
>		fied by thread does not refer to a joinable thread.
2006-11-28 11:05:31 +00:00
kientzle
b0a259a119 Improve support for large ISOs:
* Correct a signed/unsigned problem that broke handling of files >2G.
   * Implement "skip" support for much faster "tar -t".

Thanks to: Robert Sciuk for sending me a DVD that illustrated the first problem
2006-11-27 16:30:32 +00:00
kientzle
5b41e3aa03 Bump the libarchive version number, correct the shell hackery to break
the full version down into major/minor values.
2006-11-26 19:09:42 +00:00
kientzle
0f8fa3629e Write-blocking cleanup, largely thanks to Colin Percival (cperciva@).
* If write block size is zero, don't block at all.
     This supports the unusual requirement of applications
     that need "no-delay" writes.
   * Expose _write_finish_entry() to give such applications more
     control over write boundaries.  (Normal applications do not
     need this, as entries are completed automatically.)
   * Correct the type of write callbacks; this is a minor API
     change that does not affect the ABI.
   * Correct the error handling in _write_next_header() around
     completing the previous entry.
   * Correct the documentation for block-size markers:  Remove
     docs for the long-defunct _read_set_block_size(); document
     all of the write block size manipulators.

MFC after: 14 days
2006-11-26 19:00:50 +00:00
ru
815d860c2f - When building world WITHOUT_LIBPTHREAD, link libthr to libpthread.
- Don't build ngctl(8) and cached(8) if threading libs aren't built.
- Fix various issues in a cached(8) makefile.
2006-11-26 14:36:34 +00:00
kientzle
1ddaa49caf Unbreak libarchive on arm. Two parts of libarchive relied on a
traditional shortcut of defining on-disk layouts using structures of
character arrays. Unfortunately, as recently discussed on cvs-all@,
this usage is not actually sanctioned by the standards and
specifically fails on GCC/arm (unless your data structures happen to
be "naturally aligned").

The new code defines offsets/sizes for data fields and accesses
them using explicit pointer arithmetic, instead of casting to
a structure and accessing structure fields.  In particular,
the new code is now clean with WARNS=6 on arm.

MFC after: 14 days
2006-11-26 05:39:28 +00:00
kientzle
bbcf2b70bc Connect four new files to the build.
PR: bin/86742
2006-11-24 16:35:54 +00:00
yar
3caf2aa43d Note that, thanks to the work by Alan Cox et al, some arch'es
don't need sendfile() buffers any more.

The report on the work referenced can be found at
http://usenix.org/events/usenix05/tech/general/elmeleegy.html

MFC after:	1 week
2006-11-24 11:44:19 +00:00
davidxu
add205129c Eliminate atomic operations in thread cancellation functions, it should
reduce overheads of cancellation points.
2006-11-24 09:57:38 +00:00
ru
e3fcf40047 - style: use =' instead of +=' for initial assignments.
- don't add generated sources' objects to OBJS explicitly;
  GENSRCS is part of SRCS so they were already in OBJS.
2006-11-24 06:38:11 +00:00
kientzle
8aa83b7d19 Fill in a couple of missing casts: clarify one narrowing conversion
and correct the use of unary minus with an unsigned value.  (The unary
minus here is actually being used as a bitwise operation, which is
unusual enough to deserve a clarifying cast.)
2006-11-24 05:48:04 +00:00
kientzle
45d8c426b5 A few minor clarifications and corrections. 2006-11-24 05:41:16 +00:00
kientzle
f0776f9a59 A few minor corrections to the libarchive.3 overview page. 2006-11-24 05:37:38 +00:00
kientzle
ea391351c9 Document the new _open_FILE() and _open_memory() interfaces.
PR: bin/86742
2006-11-24 05:34:23 +00:00
kientzle
7d9bedda5f New hooks for reading/writing archives to/from a FILE * or
an in-memory buffer.

PR: bin/86742
2006-11-24 02:00:48 +00:00
jhb
aacfa06ebd Document that the data field for NOTE_EXIT holds the process exit status.
Submitted by:	Jared Yanovich -phirerunner at comcast.net-
MFC after:	2 weeks
2006-11-20 22:20:04 +00:00
kientzle
1eab20d6ea Officially rename archive_{read,write}_open_file() to
archive_{read,write}_open_filename():
   * Update Makefile to build the files using the new name.
   * Update docs to document the new names, mentioning the
old ones as "deprecated synonyms."
   * The old filenames will be reconnected to the build soon;
I'll soon recyce those files for a slightly different purpose.
2006-11-20 16:48:04 +00:00
kientzle
62b3d9e35c Add archive_write_open_filename()/archive_read_open_filename() as
synonyms for archive_write_open_file()/archive_read_open_file().
The new names are much clearer.
2006-11-15 05:33:38 +00:00
kientzle
8f03f2f27b Style: Use the correct type for a sizeof() variable. 2006-11-15 05:20:14 +00:00
kientzle
8c58f2d4e8 Change the internal API for writing data to an entry; make the
internal format-specific functions return the same as the public
function, so that the public API layer doesn't have to guess the
correct return value.  This addresses an obscure problem that occurs
when someone tries to write more data than the size of the entry (as
indicated in the entry header).  In this case, the return value from
archive_write_data() was incorrect, reflecting the requested write
rather than the amount actually written.

MFC after: 15 days
2006-11-15 05:14:20 +00:00
kientzle
b3076e31d7 No change in functionality, but fill in a missing error
message when reading a truncated tar archive.
2006-11-13 16:50:18 +00:00
ru
8ee020ccf7 Fix minor formatting issues:
- make document title match filename;
- remove hard sentence breaks, whitespace at EOL, and double whitespace;
- sort SEE ALSO xrefs, adding missing section numbers;
- fix a misspelled macro name.
2006-11-13 09:46:16 +00:00
kientzle
341ae2b09b These files no longer use internal APIs, so no longer need to include
archive_private.h.
2006-11-13 00:29:57 +00:00
kientzle
925ac6f1b9 Minor cleanup of the standard read/write I/O modules:
* Use public API, don't access struct archive directly.  (People should be able to copy these into their applications as a template for custom I/O callbacks.)
 * Set "skip" only for regular files.  ("skip" allows the low-level library to catch attempts to add an archive to itself or extract over itself.)
 * Simplify the write_open functions by just calling stat() at the beginning.  Somehow, these functions had acquired some complex logic that tried to avoid the stat() call but never succeeded.

MFC after: 10 days
2006-11-13 00:26:45 +00:00
kientzle
7f111df028 Correctly handle writing very large blocks (>1M) through to a disk
file.  This doesn't happen in normal use, because the file I/O and
decompression layers only pass through smaller blocks.  It can happen
with custom read functions that block I/O in larger blocks.
2006-11-12 23:45:40 +00:00
jkoshy
1d082af7af - Replace the use of DPSRCS with something more appropriate. DPSRCS
is for when you need something in ".depend", but not compiled in.
- Style fixes: Spell ${.OBJDIR} as ".".
- Neaten a comment.

Submitted by:	ru
2006-11-12 18:43:25 +00:00
jkoshy
62913629e6 MFP4: Add an implementation of the ELF(3) and GELF(3) API set.
Bump __FreeBSD_version.

Reviewed by:	jb
2006-11-11 17:16:35 +00:00
davidxu
cc0840138e Move code calculating new inherited priority into single function. 2006-11-11 13:33:47 +00:00
des
cd277df0bb childerr needs to be volatile so gcc won't optimize it away.
PR:		bin/85830
MFC after:	1 week
2006-11-10 23:33:25 +00:00
kientzle
50bb724108 Portability and style fixes:
* Actually use the HAVE_<header>_H macros to conditionally include
    system headers.  They've been defined for a long time, but only
    used in a few places.  Now they're used pretty consistently
    throughout.
  * Fill in a lot of missing casts for conversions from void*.
    Although Standard C doesn't require this, some people have been
    trying to use C++ compilers with this code, and they do require it.

Bit-for-bit, the compiled object files are identical, except for
one assert() whose line number changed, so I'm pretty confident I
didn't break anything.  ;-)
2006-11-10 06:39:46 +00:00
trhodes
a5378c36b6 Add an entry for PT_GETLWPLIST.
Nudged by:	jhb
Reviewed by:	davidxu
2006-11-09 11:27:18 +00:00
cognet
93ee84a578 Cleanup: we always have to use __error() now, and we shouldn't provide a
errno symbol, so completely remove the !_REENTRANT case.

Spotted out by:	ru
2006-11-09 01:28:16 +00:00
ru
adde7c231a Remove a forgotten file. 2006-11-08 21:29:20 +00:00
simon
bee45f8f12 Fix infinite loop in corrupt archives handling in libarchive(3).
Reported by:	rink
Submitted by:	kientzle
Security:	FreeBSD-SA-06:24.libarchive
2006-11-08 14:03:50 +00:00
cognet
367bc6b8e0 Instead of re-implementing hton[ls] and friends for each arch, add a new MI
file, net/ntoh.c, which just implement them using the inline functions from
<sys/endian.h>.

Suggested by:	bde
2006-11-06 22:07:47 +00:00