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
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
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
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
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
3c776c8aa6
Bump libc minor for _lwp_ctl, libpthread constructor changes.
2007-11-13 17:13:14 +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
3b9b3c5341
We now need <sys/lwpctl.h> included in order to lint LintSysNormal.c.
2007-11-13 09:07:33 +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
christos
0405bf4cb9
always compile getopt_long. some ifdef reduction. more to come.
2007-11-09 03:29:20 +00:00
martin
4cdfe9d3ee
When creating unsigned int results, do not distinguish positive versus
...
negative overflow.
2007-11-08 21:31:04 +00:00
martin
5265977a9e
When converting long double values to integer types, explicitly use the
...
"round to zero" variants of the softfloat conversion functions.
Add a variant to convert long double to unsigned long - the "to long"
variant checked for overflows that do not apply to unsigned results.
This fixes the regress/lib/libc/convfp tests for sparc64.
2007-11-08 15:50:19 +00:00
ad
bdd61de26b
Add _lwp_setname/_lwp_getname to libc.
2007-11-07 00:52:25 +00:00
christos
b3b90d7485
Revert previous. This mess of ifdefs needs to be killed.
2007-11-06 22:08:51 +00:00
martin
c607cb216f
Mark the characters between 0x80 and 0xff as 1 cell wide, if compiled
...
with ALL_80_TO_FF_SW1 defined. This is not correct in the general case,
but helps in certain restricted environments where nothing but the
default locale is available and we know what we do(tm).
2007-11-06 19:24:19 +00:00
christos
9df03145fa
move the test to replace getopt higher up, before we need to include anything.
2007-11-06 19:13:16 +00:00
dsl
bd8185f2eb
syscall() has to be implemented in the kernel - so is a normal system call here.This has always been broken, so I suspect everything is using __syscall().
2007-11-05 20:30:07 +00:00
pooka
2592930cfe
remember to bump date
2007-11-04 21:36:59 +00:00
pooka
057838d510
libc errlist uses "Block device required" for ENOTBLK, so display
...
that also here.
2007-11-04 21:35:48 +00:00
skrll
29353f93e2
Build a local copy of exit that doesn't call __cxa_finalize. It's not
...
needed and drags in a lot of libc via free.
2007-10-30 17:19:59 +00:00
skrll
f1273d89a6
Set up the tail of the instruction address queue so that
...
we don't have to rely on luck for swapcontext(3) to work.
This fixes a problem pointed out to me by Chuck Silvers.
2007-10-28 09:38:06 +00:00
christos
7d0c83db72
make _FORTIFY_SOURCE play nicely with lint
2007-10-26 19:48:14 +00:00
reed
b72da12b34
Add HISTORY: The strtof() and strtold() functions appeared in NetBSD
...
4.0.
2007-10-24 13:42:10 +00:00
tnozaki
561e0bd51b
remove invalid range check.
2007-10-23 15:28:25 +00:00
simonb
e19457f411
Add a reference to RFC 2783. Requested by joerg@
2007-10-22 05:35:37 +00:00
simonb
46de085339
Revert the CSE parts of the previous change. "run" is calculated with
...
a different value for "pageind" each time through the loop, so we can't
precalculate it.
Fixes awk core dump issues on powerpc 405.
2007-10-22 04:16:48 +00:00
christos
8de47c09e3
- do some CSE.
...
- pass lint
2007-10-19 19:28:57 +00:00
yamt
b79fded28d
use mremap for huge -> huge realloc.
...
fix PR/31425 (Nicolas Joly) and possibly PR/36175 (Brian de Alwis).
2007-10-16 15:12:16 +00:00
ad
9c3109d6c5
Add _SC_NPROCESSORS_ONLN and _SC_NPROCESSORS_CONF for sysconf(). These
...
are extensions but are provided by many Unix systems.
2007-10-15 14:12:54 +00:00
yamt
89aa62f9b2
we don't have reallocf.
2007-10-15 11:18:44 +00:00
yamt
687cd24ebe
make lint happy.
2007-10-15 10:30:56 +00:00
yamt
1277f9b0a0
malloc_print_stats: print huge_allocated correctly. it's already in bytes.
2007-10-15 10:28:10 +00:00
yamt
14bfffc9db
use MAP_ALIGNED.
2007-10-15 00:05:00 +00:00
rmind
25e540085b
Add cancellation stubs in libpthread for POSIX messages queues and
...
asynchronous I/O.
OK by <ad>.
2007-10-09 18:18:33 +00:00
ad
3465d8db6f
Add defs for hppa. From he@.
2007-10-09 00:59:52 +00:00
uwe
a34b3f871d
In handwritten asm use -fPIC code instead of -fpic, our libc has grown
...
large enough for GOT to be larger than 8k.
While here kill redundant PIC ifdefs in setjmp.S - sparc "call"
instruction is piccy by itself.
Tested by martin@
2007-10-08 13:06:00 +00:00
he
7ed9cc8edd
On sparc64, both __sparc__ and __sparc64__ is defined. Avoid redefinition
...
of size constants for sparc64.
This code still produces many, many lint warnings due to "may loose accuracy"
when mixing long/int, and also warnings related to <<.
2007-10-07 21:45:18 +00:00
ad
81e619b9a4
Update for jemalloc.
2007-10-06 01:09:48 +00:00
ad
9b64888c5d
Use jemalloc as the default allocator unless USE_JEMALLOC=no.
2007-10-06 01:09:07 +00:00
ad
e7a9e46b7e
Port to NetBSD. Note: posix_memalign() is here, but it's not exported
...
via the headers yet.
2007-10-05 23:42:23 +00:00
ad
8a475bcba1
Pull in jemalloc from FreeBSD:
...
FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp
2007-10-05 23:39:58 +00:00