Commit Graph

12193 Commits

Author SHA1 Message Date
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
ad 3c776c8aa6 Bump libc minor for _lwp_ctl, libpthread constructor changes. 2007-11-13 17:13:14 +00:00
ad 15e9cec117 For PR bin/37347:
- Override __libc_thr_init() instead of using our own constructor.
- Add pthread__getenv() and use instead of getenv(). This is used before
  we are up and running and unfortunatley getenv() takes locks.

Other changes:

- Cache the spinlock vectors in pthread__st. Internal spinlock operations
  now take 1 function call instead of 3 (i386).
- Use pthread__self() internally, not pthread_self().
- Use __attribute__ ((visibility("hidden"))) in some places.
- Kill PTHREAD_MAIN_DEBUG.
2007-11-13 15:57:10 +00:00
ad 46f5cd4fb9 - Make it pass lint.
- Add RCSID.
2007-11-13 15:33:55 +00:00
ad ec4d182d4a - stack_protector.c doesn't really belong under sys/. Add a new directory
for misc support routines and put it there.
- Add a libc constructor. Use this to initialize threading and the
  stack protector stuff. libpthread cannot be initialized safely using
  its own constructor because libc and libpthread are deeply intertwined.
  PR bin/37347
2007-11-13 15:21:19 +00:00
he 4869f8a215 Need to point to sys/ for includes to pick up <sys/lwpctl.h> for
the lint stubs.
2007-11-13 10:22:15 +00:00
he 3b9b3c5341 We now need <sys/lwpctl.h> included in order to lint LintSysNormal.c. 2007-11-13 09:07:33 +00:00
skrll 6e57c35ead Remove an include that's not required. 2007-11-13 08:41:50 +00:00
ad 9202b10ca9 Cosmetic change. 2007-11-13 01:21:32 +00:00
ad b668a9a05f Add _lwp_ctl() system call: provides a bidirectional, per-LWP communication
area between processes and the kernel.
2007-11-12 23:11:58 +00:00
ad 51a2159851 Don't unconditionally clear the direction flag. The ABI says it must always
be clear when making a function call, and 'cld' takes about 50 clock cyles
on the P4.
2007-11-12 18:41:59 +00:00
pooka 805571cfce remove header that was never committed 2007-11-12 17:35:32 +00:00
pooka 9ac65ee1fe * split the putter header into a kernel version and a userland version
+ install latter to /usr/include/dev/putter
* remove last dependencies to puffs from putter, it's completely
  independent now
2007-11-12 16:39:32 +00:00
jmmv 096ebe7672 Add the libatf library
This adds reachover Makefiles to build the libatf library and enables it in
the parent Makefile.

Things to review in this change:

* Add proper version numbers in the shlib_version files.

* Is libatf properly listed in lib/Makefile?  It theoretically needs
  libstdc++, but the resulting binary library is not linked against it.
2007-11-12 14:56:24 +00:00
christos 0405bf4cb9 always compile getopt_long. some ifdef reduction. more to come. 2007-11-09 03:29:20 +00:00
joerg b9d83a2411 Fix a typo in the last change that broke a comparision. 2007-11-08 21:58:26 +00:00
martin 4cdfe9d3ee When creating unsigned int results, do not distinguish positive versus
negative overflow.
2007-11-08 21:31:04 +00:00
joerg 6475789b74 Add kvm_dump_header and implement kvm_dump_wrtheader on top of it.
This function allows the caller finer control of how the writes happen
and doesn't force stdio as interface. Optimise clear_gap a bit to not
fill the gap byte-wise. Bump minor version of libkvm.
2007-11-08 20:48:04 +00:00
drochner 754fc2622c Set the number of record and play channels individually -- currently
we try to set both in one ioctl, to the same value, which fails if not
both record and play direction support that many channels. (Having
more play than record channels is common these days.)
This does likely address part of the problem described in PR pkg/35444
by Mihai Chelaru, and it helped Matthew R. Green about half a year
ago -- see the thread in tech-misc in April.
2007-11-08 20:27:25 +00:00
joerg 4267598f61 ANSIfy. 2007-11-08 17:32:30 +00:00