Commit Graph

12100 Commits

Author SHA1 Message Date
pooka
753b7cae6e Add puffs_cc_schedule() which marks a pcc runnable and will pass
execution to it when in the main loop the next time.
2007-10-21 19:25:58 +00:00
pooka
c683f6f6b5 Get rid of MULTITHREADED_REFUSE for context queries. We can simply
use the pthread codepaths always.
2007-10-21 16:46:52 +00:00
he
71a133879f To work around lint problems, add a LINTED comment on pooka's request. 2007-10-21 16:29:40 +00:00
pooka
a3e1355fe5 Use new puffs features to provide correct caller info instead of
sometimes returning stale data.
2007-10-21 14:36:35 +00:00
pooka
be98071c8c Always provide caller information from the kernel based on curlwp.
(but don't deprecate the old puffs_cid interface just yet)
2007-10-21 14:28:05 +00:00
pooka
cc72c593dd typo in comment 2007-10-21 14:26:15 +00:00
christos
8de47c09e3 - do some CSE.
- pass lint
2007-10-19 19:28:57 +00:00
pooka
cf6e3aa4f9 When doing a read operation, don't copy the whole kernel buffer to
userspace, since it doesn't contain any information yet.  I should
still rework this more so this is just a quickie to get the read/write
style interface more up to speed with the ioctl version.
2007-10-19 14:38:45 +00:00
yamt
21ac91dd00 sync with kernel after the merge of yamt-x86pmap branch. 2007-10-18 15:30:43 +00:00
pooka
ce87c49167 * Change type of boolean functions to, well, boolean instead of int.
* add puffs_cid_isequal() which can be used to test if the two caller
  id's refer to the same process/lwp.
2007-10-18 13:48:04 +00:00
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