Commit Graph

12090 Commits

Author SHA1 Message Date
ad
84a6749ef2 Note that libpthread_dbg needs to be checked after making changes to
libpthread.
2007-10-16 15:21:54 +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
bc9419f99a Crank libpthread_dbg major. 2007-10-16 15:11:27 +00:00
ad
f1b2c1c4c9 ... but preserve the linked list, for the debugger only. 2007-10-16 15:07:02 +00:00
ad
9472415c5e Remove stuff that is no longer useful. 2007-10-16 15:06:11 +00:00
ad
9583eeb248 Replace the global thread list with a red-black tree. From joerg@. 2007-10-16 13:41:18 +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
jnemeth
66687b0cb5 SSP doesn't like alloca... 2007-10-13 20:36:43 +00:00
pooka
33c91738e5 Part 1/n of some pretty extensive changes to how the kernel module
interacts with the userspace file server:

  * since the kernel-user communication is not purely request-response
    anymore (hasn't been since 2006), try to rename some "request" to
    "message".  more similar mangling will take place in the future.

  * completely rework how messages are allocated.  previously most of
    them were borrowed from the stack (originally *all* of them),
    but now always allocate dynamically.  this makes the structure
    of the code much cleaner.  also makes it possible to fix a
    locking order violation.  it enables plenty of future enhancements.

  * start generalizing the transport interface to be independent of puffs

  * move transport interface to read/write instead of ioctl.  the
    old one had legacy design problems, and besides, ioctl's suck.
    implement a very generic version for now; this will be
    worked on later hopefully some day reaching "highly optimized".

  * implement libpuffs support behind existing library request
    interfaces.  this will change eventually (I hate those interfaces)
2007-10-11 19:41:13 +00:00
pooka
bf2346742b g/c #if 0'd code which isn't likely to get used any time soon 2007-10-09 21:04:55 +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
skrll
c6deb42c81 Provide PTHREAD__ASM_RASOPS for alpha.
The gcc generated lock try RAS is broken as the store needs to be the last
instruction.
2007-10-08 16:04:43 +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
christos
b093a7796c split LOGIN_SETGROUP -> LOGIN_SETGID|LOGIN_SETGROUPS 2007-10-06 21:51:21 +00:00
martin
167a3a9d68 Make it build without HAVE_WCHAR 2007-10-06 20:14:41 +00:00
martin
b3fd7f365b Make the non-WCHAR variant compilable. 2007-10-06 18:31:33 +00:00
xtraeme
8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +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
pooka
c8c5d830fc SEE ALSO paper 2007-10-05 00:04:59 +00:00
ad
507f1ca139 Compile pthread_getspecific / pthread_setspecific with -fomit-frame-pointer
-falign-functions=32, since these two really get hammered on. To make them
faster needs a threadreg or TLS, unless there is a way to tell gcc that a
library-local (pthread__threadmask) variable does not need to be PIC.
2007-10-04 21:08:35 +00:00
ad
5059087834 Drop PTHREAD__NSPINS back from 1000 to 64. Setting the waiters bits and
preparing to sleep on a mutex are slow in relative terms, so this allows
us to recover from short lock holds without blocking, while not wasting
too much time on longer holds.
2007-10-04 21:04:32 +00:00
ad
a4b475cd22 Fix a thinko. 2007-10-04 01:46:49 +00:00
pooka
0e5d568d01 minor updates/clarifications 2007-10-02 13:41:44 +00:00
pooka
174fb761dd Pass reason string to pu_errnotify. Print it in the default
version before aborting.
2007-10-01 21:10:50 +00:00
pooka
930ce5ac9b support error notifications 2007-09-29 22:07:32 +00:00
tnozaki
fc34dcfbb7 s/__attribute__((__packed__))/__packed/g; 2007-09-29 08:10:17 +00:00
tnozaki
059d600590 1. add workaround for ctype.h is* funcs problem.
isspace((int)0xA0) should return false under LC_CTYPE=en_US.UTF-8,
   see: http://www.freebsd.org/cgi/query-pr.cgi?pr=116363&cat=gnu
2. change __runtable_to_netbsd_ctype() as reentrant.

patch ok'ed by tshiozak-san, thanks!
2007-09-29 07:55:45 +00:00
lukem
2aa3c760cc support nbtool_config.h. 2007-09-28 09:07:16 +00:00
pooka
6eff998647 silence lint. also noticed by xtraeme 2007-09-27 23:11:41 +00:00
pooka
aa533e99dd Add error notifications, which are used to deliver errors from the
kernel to the file server for silly things the file server did,
e.g. attempting to create a file with size VSIZENOTSET.  The file
server can handle these as it chooses, but the default action is
for it to throw its hands in the air and sing "goodbye, cruel world,
it's over, walk on by".
2007-09-27 21:14:49 +00:00
christos
f1f2d5a365 make this compilable from rtld. 2007-09-27 17:53:05 +00:00
dogcow
b8d6c11ba4 <machine/profile.h> needs <sys/types.h>; why crt0.c needs <machine/profile.h>
(and only on amd64) is another question altogether.
2007-09-27 10:51:18 +00:00
tnn
aa8a5e0d63 remove extraneous "has" 2007-09-25 09:42:51 +00:00
junyoung
8fa93f7dc6 Farewell to gccism. 2007-09-25 08:22:44 +00:00
junyoung
4271bf2ec5 Massive cosmetic changes, notably:
* ANSIfy
 * De-__P
 * u_intXX_t -> uintXX_t
 * Remove "extern" from function prototypes
2007-09-25 08:19:09 +00:00
junyoung
0e2bf8ef62 Remove trailing spaces. 2007-09-25 08:16:08 +00:00
lukem
e9aa053c09 Add raise_default_signal(3) -- raise the default signal handler.
Can be used by applications that have their own SIGINT (et al)
handlers and want to exit in a manner that correctly
signals to the parent that the process was terminated by a signal.
See http://www.cons.org/cracauer/sigint.html for more info.
Discussed on tech-userlevel@.
2007-09-25 01:13:54 +00:00
ad
af8ed8ad89 Kill PTHREAD_SPIN_DEBUG - it's not must use with 1:1. 2007-09-24 13:56:42 +00:00
skrll
d32ed98975 Resurrect the function pointers for lock operations and allow each
architecture to provide asm versions of the RAS operations.

We do this because relying on the compiler to get the RAS right is not
sensible. (It gets alpha wrong and hppa is suboptimal)

Provide asm RAS ops for hppa.

(A slightly different version) reviewed by Andrew Doran.
2007-09-24 12:19:39 +00:00
pooka
12e401bc1a Add refuse paper to SEE ALSO 2007-09-24 00:22:25 +00:00
ad
598943b712 Adjust previous for clarity. 2007-09-21 21:28:11 +00:00