Commit Graph

12212 Commits

Author SHA1 Message Date
ad
8b96cb8a97 Back out the per-cpu arena changes. With this, ld.so magically stops
loading libc/libpthread twice -- which does not make sense, because it
has its own private malloc().
2007-12-01 22:44:44 +00:00
wiz
9429ef03ff Fix another persistent spello. 2007-12-01 19:54:01 +00:00
wiz
0b6ffdfedb Fix a typo that has migrated across files. 2007-12-01 19:18:49 +00:00
wiz
a6e62b1ef7 Use more markup. New sentence, new line. 2007-12-01 19:03:26 +00:00
pooka
c8c3c477bb fix gotframe signature to match code 2007-12-01 18:59:36 +00:00
wiz
8498f992c4 Typo fixes. 2007-12-01 18:53:28 +00:00
wiz
46b4723955 eg -> e.g. 2007-12-01 18:33:11 +00:00
yamt
c2ad33834a CLEANFILES=${OBJS} 2007-12-01 11:06:36 +00:00
yamt
82f3754f04 ___start: remove a stale comment. 2007-12-01 10:16:06 +00:00
ad
64ebe1397e Hack around ld.so initializing pthread users before libpthread/libc. 2007-12-01 01:19:31 +00:00
ad
b565a56cfb - On 64-bit platforms 1/2 the default tsd values were garbage. Fix it.
- The lwpctl block is now needed on uniprocessors, for pthread_curcpu_np().
2007-12-01 01:07:34 +00:00
rillig
b54c9d13a0 typo 2007-11-30 23:01:03 +00:00
pooka
21913eabe5 Rototill.
Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.
2007-11-30 19:02:28 +00:00
dsl
b3dec55727 Fix the other half of the 'store int as a thread specific pointer'/ 2007-11-30 17:44:38 +00:00
christos
e09a2e99e8 converting a pointer to unsigned is bad; use uintptr_t. 2007-11-30 17:09:22 +00:00
ad
49dcd767c3 Make the allocation arenas per-CPU in the most optimistic case, but
continue to 'stripe' by thread in case of contention.
2007-11-29 18:46:13 +00:00
pooka
aadcb17f11 * allocate pcc as a slice from the stack instead of allocating it
separately
* provide puffs_cc_getcc()

This is in preparation for the removal of you-should-guess-what as
an argument to routines here and there and everywhere.
2007-11-29 17:47:54 +00:00
pooka
73a538eac2 print mode in open 2007-11-29 17:22:04 +00:00
christos
f6cecc05cf Sync phk malloc.c with the latest one from FreeBSD. This gives us the
same api as jemalloc by:

    - adding posix_memalign()
    - moving calloc in the same file
    - renaming malloc_options -> _malloc_options
2007-11-28 21:55:14 +00:00
christos
621fa4d8c6 Regen! 2007-11-27 22:19:11 +00:00
christos
5b5262a0af another minor fix from Anon Ymous 2007-11-27 22:16:03 +00:00
ad
ae87f94d1d Bump libc/libpthread minor for thr_curcpu()/pthread_curcpu_np(). 2007-11-27 21:06:41 +00:00
ad
4084ca7f3f Add thr_curcpu(), pthread_curcpu_np(). 2007-11-27 20:58:26 +00:00
ad
d5e9b90716 Fix a warning with _LP64. 2007-11-27 20:55:03 +00:00
pooka
6a3d9a187d Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.
2007-11-27 11:31:17 +00:00
tnozaki
7e1ba00ce8 more PR/36938, restore internal-state if mbtowc() throw EILSEQ.
patch provided by Shiozaki-san, thanks.
2007-11-26 15:31:30 +00:00
christos
1f07a76abf fix substitutions. From Anon Ymous 2007-11-26 15:12:06 +00:00
pooka
7568ff51e1 print more info when receiving an abort 2007-11-26 12:20:21 +00:00
dsl
d8e8042c1c Add a note about the difficulty of actually looking at the return value
of __syscall() caused by ABIs (eg sparc) that don't pass the low bits of
a 64 bit result in the same register as a 32 bit result.
2007-11-23 20:29:40 +00:00
uebayasi
2b37ebddcf KNF; no variable name in function prototype. 2007-11-23 12:39:15 +00:00
dsl
3ba44b945b Reorder the code for i386 and amd64 syscall stubs so that the 'jc' on error
is a forwards jump instead of a backwards jump that a P4 will mispredect (and
probably immediatly get a cache-line miss due to the way the code gets
aligned).
2007-11-23 07:36:05 +00:00
dsl
b0b7248d92 Change all the syscall C 'glue' functions (most of which just add in an
extra argument to ensure that 'off_t' parameters are even numbered
parameters for stack alignment reasons on 32 bit systems) to use a normal
'syscall' wrapper for __foo instead of using __syscall(SYS_foo, ... ).
This saves all the faffing needed to get a 32bit return value on sparc.
Auto-generate the extra syscall wrappers.
Move swapon.c into the correct list (swapon() uses swapctl()).
This probably means there are very few users of syscall() and __syscall() left.
2007-11-22 21:11:30 +00:00
tnozaki
fca38949e4 fix lib/37290
- don't call abort(3) when there's no suitable charset found.
- use iso-8859-1(or INIT1 if specified) for C1 control char.
2007-11-21 14:19:32 +00:00
rillig
55bf992f36 The e* functions don't call the error handler in every case, just in
case of an error.

Mentioned the error conditions for the various functions.
2007-11-21 09:17:24 +00:00
ad
a4c99db9fe Sync with reality, and note that programs must link against the dynamic
libpthread in order to remain compatible with future releases of NetBSD.
2007-11-19 15:53:20 +00:00
ad
8077340e63 Remove the debuglog stuff. ktrace is more useful now. 2007-11-19 15:14:11 +00:00
ad
a448c4f214 int -> ssize_t in a couple of places. 2007-11-19 15:12:18 +00:00
ad
95182011ed Enable posix_memalign(). 2007-11-19 14:48:41 +00:00
skrll
4f3467d61e Remove unused include.
Fix unwind info with S/ENTRY/LEAF_&/
2007-11-18 14:11:25 +00:00
skrll
8ed2bd6ec6 Generate correct unwind info for syscall stubs by using LEAF_ENTRY instead
of ENTRY(foo,0) so that gdb can backtrace through the stubs.
2007-11-18 13:25:39 +00:00
jdc
ca32a8e578 We don't need to call __init_getch here, as it is called from
screen.c:newterm().
2007-11-18 10:01:04 +00:00
pooka
dac2b0c689 fix request size 2007-11-17 17:12:11 +00:00
pooka
4b2334142b puffs_mount():
* initialize values better
* always go through "fail" to see if puffs_daemon() needs to be
  woken up
* open device r/w instead of r/o
2007-11-17 16:06:18 +00:00
plunky
06e82841a0 Fix problem with handling SDP contination state, from FreeBSD
(specifically, this manifested itself when reading a long HID
descriptor from a Microsoft Mouse.)
2007-11-16 19:35:08 +00:00
pooka
3537e99eb1 Introduce puffs_daemon(), which works like daemon(3) except that it
also synchronizes with puffs_mount() and does not return (exit) in the
parent process until the file system has been mounted.  This makes
it possible to reliably run e.g. mount_foo jippi /kai ; cd /kai/ee
2007-11-16 18:35:10 +00:00
pooka
154c2e54fb dump lookup return values 2007-11-16 14:59:14 +00:00
drochner
095b25e7dd Add pthread_equal() to libc stubs; this makes a lot of sense for
threadsafe libraries implementing own locking functions.
Ride on yesterday's minor version bumps.
2007-11-14 19:28:23 +00:00
ad
4be57c5368 Don't try to block if there are already waiters; it doesn't make sense. 2007-11-14 17:20:57 +00:00
ad
b919eb8116 Crank libpthread to 0.8. It now uses _lwp_ctl(), and it's handy to keep
0.7 hanging around for old kernels.
2007-11-13 17:22:51 +00:00
ad
66ac2ffaf2 Mutexes:
- Play scrooge again and chop more cycles off acquire/release.
- Spin while the lock holder is running on another CPU (adaptive mutexes).
- Do non-atomic release.

Threadreg:

- Add the necessary hooks to use a thread register.
- Add the code for i386, using %gs.
- Leave i386 code disabled until xen and COMPAT_NETBSD32 have the changes.
2007-11-13 17:20:08 +00:00