Commit Graph

11991 Commits

Author SHA1 Message Date
ad 2639b90e3b One more micro-optimization.. 2007-08-16 14:53:45 +00:00
ad d9adedd764 Trim fat off libpthread internal spinlock operations. Makes a mesurable
improvement across the board.
2007-08-16 13:54:16 +00:00
ad b8833ff53f - Reinitialize the absolute minimum when recycling user thread state.
Chops another ~10% off create/join in a loop on i386.
- Disable low level debugging as this is stable. Improves benchmarks
  across the board by a small percentage. Uncontested mutex acquire
  and release in a loop becomes about 8% quicker.
- Minor cleanup.
2007-08-16 12:01:49 +00:00
ad 71197327ee Catch up with libpthread changes. 2007-08-16 01:09:50 +00:00
ad 9e28719960 Remove PT_FIXEDSTACKSIZE_LG. 2007-08-16 01:09:34 +00:00
ad ed964af19e Cache thread context for creation instead of setting it up every time.
Speeds create/join loop by about 10-15% on i386.
2007-08-16 00:41:23 +00:00
ad c94f5a91bc Simplify pthread_join(). Knocks about 5% off pthread_create/join in a loop. 2007-08-15 22:48:52 +00:00
pooka 25a346d4fb Nuke PUFFSLOOKUP_FOO and move to NAMEI_FOO 2007-08-15 14:19:19 +00:00
pooka 306d09812c In case a file system doesn't provide st_blksize, default to DEV_BSIZE. 2007-08-12 15:32:39 +00:00
christos 5f3802ca6e patches from Axel Thimm 2007-08-12 07:41:51 +00:00
pooka ea9b8a0046 run realpath() on the mountpath 2007-08-11 18:04:50 +00:00
drochner b36bcf93ef make the hypot/atan2 functions weak aliases, because they are used
internally by the historical cabs(), and the future c99 cabs/carg
2007-08-10 21:20:35 +00:00
he fd961c4429 Add a new socket option for unix domain sockets: LOCAL_PEEREID, to make
it possible to get the pid, euid and egid of the process at the remote
end at the time it did bind() or connect().

Add a new libc function, getpeereid() to easily get at the euid and egid.
As a consequence, bump libc's minor number.

Document the LOCAL_PEEREID socket option in unix(4).

Based on contribution by Arne H. Juul, minor modifications by myself.
2007-08-09 15:23:01 +00:00
kristerw 3a6ef3e3c1 Keep track of atexit functions that are added while processing
atexit functions, to ensure that the new functions will be called.
2007-08-08 01:05:34 +00:00
kristerw af220472c9 Ensure that the struct atexit_handler has been removed from the list
of pending atexit handlers before the structure is reused.  This prevents
__cxa_finalize from going into an infinite loop when an atexit handler
register a new atexit handler as in:

   #include <stdlib.h>

   void two(void) {
   }

   void one(void) {
           atexit(two);
   }

   int main(void) {
           atexit(one);
           return 0;
   }
2007-08-08 00:51:18 +00:00
wiz 90a93c1dcd Various improvements: sort errors; use more
markup; fixes for HTML and PostScript output.
2007-08-07 20:45:03 +00:00
ad 1d42dbd29a Missed variable rename.. 2007-08-07 19:58:30 +00:00
ad c3f8e2ee55 Change the signature of _lwp_park() to accept an lwpid_t and second
hint pointer, but do so in a way that remains compatible with older
pthread libraries. This can be used to wake another thread before the
calling thread goes asleep, saving at least one syscall + involuntary
context switch. This turns out to be a fairly large win on the condvar
benchmarks that I have tried.
2007-08-07 19:04:21 +00:00
pooka a213499d32 dump further info for read/write 2007-08-07 13:44:27 +00:00
joerg b4d8fb4e3e Update to libarchive-2.2.6. 2007-08-06 12:31:16 +00:00
kristerw d0d36b6101 Update includes so that this builds for USE_FORT=no too. 2007-08-04 19:37:52 +00:00
ad 7bf06aa722 Make libpthread_dbg build again. 2007-08-04 18:54:12 +00:00
ad 15c28fd2d8 Update. 2007-08-04 13:46:04 +00:00
ad a014cf23cb Fix error in previous. 2007-08-04 13:43:46 +00:00
ad 50fa8db4e4 Some significant performance improvements, and a fix for a race with pthread
detach/join.

- Make mutex acquire spin for a short time, as done with spinlocks.
- Make the number of spins controllable with the env var PTHREAD_NSPINS.
- Reduce the amount of time that libpthread internal spinlocks are held.
- Rely more on the barrier effects of park/unpark to avoid taking spinlocks.
- Simplify the locking around pthreads and the global queues.
- Align per-thread sync data on a 128 byte boundary.
- Offset thread stacks by a small amount to try and reduce cache thrash.
2007-08-04 13:37:48 +00:00
jdc a39089a88a Add KEY_RESIZE.
Fix use after free().
2007-08-04 08:36:49 +00:00
wiz 5ad579abd9 Explicitly talk about file pointers (to avoid confusion with general C pointers).
Suggested by joerg.
Bump date.
2007-08-02 23:46:39 +00:00
wiz e3d3393d01 Add xref to shquote(3), suggested by joerg. Bump date. 2007-08-02 23:45:10 +00:00
ad 2813873c47 Remove unused counters. 2007-08-01 21:48:19 +00:00
pooka 78302eef99 Per rumble's lead in vnodeops, clarify the bit about readdir cookies. 2007-07-31 21:48:18 +00:00
ginsbach f5f9bb5739 Make sure that %r honors the LC_TIME t_fmt_ampm. This restores
functionality lost at revision 1.12!
2007-07-31 20:19:16 +00:00
joerg 577a8c7029 Add build glue for libarchive and update the various sets. 2007-07-29 17:06:00 +00:00
pooka 8631cf4e2b mmap fflags -> prot 2007-07-27 08:28:16 +00:00
pooka b2a631b1fe * add missing credential handle to fsync args
* and now with more cosmetic attack
2007-07-25 09:10:26 +00:00
pooka 9825955cc2 pure cosmetics: minor facelift 2007-07-25 08:31:19 +00:00
dyoung bfa27930cb In sockaddr_snprintf(sbuf, len, fmt, sa), do not write the terminating
null character outside of the byte region [sbuf, sbuf + len).

1) If the length of the buffer is 0, do not write a null character
   at all.  Previously, sockaddr_snprintf() may have been able to
   overwrite sbuf[-1] if len was 0.

2) If the length of the buffer, len, is greater than 0, then write
   the null at sbuf[len - 1].  Previously, sockaddr_snprintf()
   wrote the null at buf[len - 1], where `buf' was a "cursor" that
   did not necessarily equal `sbuf', the start of the buffer.  Now,
   sockaddr_snprintf() always writes the null at sbuf[len - 1].
2007-07-24 08:45:45 +00:00
blymn f8e74d7a72 Redraw an item when the value is changed as the mark/unmark status (if
applicable) may have changed.
2007-07-23 12:12:19 +00:00
pooka b0e54182a4 document puffs_framev_enqueue_waitevent 2007-07-21 09:36:49 +00:00
pooka e30ed21300 Return -1 and errno from puffs_framev_enqueue_waitevent instead of
a direct error value.
2007-07-21 09:29:07 +00:00
pooka e2dc8334cf simplify send loop 2007-07-20 14:55:42 +00:00
pooka 343e8df31e Add puffs_framev_enqueue_waitevent, which waits for read/write/error
events from an i/o descriptor.  It yields until an event happens
and continues execution when the event loop notices the event has
happened.
2007-07-20 13:14:55 +00:00
yamt 8a52d96235 add a comment. 2007-07-20 12:41:07 +00:00
pooka 99db048c69 note caveat with puffs_node_poll 2007-07-20 10:01:24 +00:00
wiz 77bf5a1ac4 Use HTML escapes. Drop trailing whitespace. Punctuation nits. 2007-07-19 19:25:09 +00:00
pooka f2825a0ae8 Don't float puffs_kargs needlessly around after mount, saves
a couple k of memory (and there was much rejoycing!)
2007-07-19 12:52:28 +00:00
christos f65c16a601 forgot include namespace.h 2007-07-19 12:05:42 +00:00
pooka 044229479a wizd reminded me that if I provide the synopsis for puffs_node_seek(),
I would do well to also describe what it does.  so make it so.
2007-07-19 08:32:06 +00:00
pooka 2f6b69c368 Use ioctl(PUFFSREQSIZEOP) instead of mount(MNT_GETARGS) to fetch
the maximum request size after mount.  Calling mount(MNT_GETARGS)
from the file server is currently not kosher, as it vrele()s the
root vnode, potentially causing an inactive, which the file server
cannot handle while it itself is inactive in the kernel (deadlock).
2007-07-19 07:54:46 +00:00
pooka 638ce78980 stuff 2007-07-19 07:48:10 +00:00
wiz 4213bf340c Uppercase logical OR operator. 2007-07-18 23:34:23 +00:00