Commit Graph

232 Commits

Author SHA1 Message Date
pooka
bc215c110d use a probe result to decide which pthread_setname_np() to use 2014-03-21 12:28:54 +00:00
pooka
fa5f7ef47e set threadname for correct pthread_t 2014-03-21 12:07:10 +00:00
njoly
61d6bfec15 Do not use uninitialized pointer if posix_memalign() fails. 2014-03-16 10:23:59 +00:00
justin
54d90457f6 If dlopen returns NULL assume we are statically linked and return,
rather than getting a warning when dlinfo fails.
2014-03-14 01:18:39 +00:00
pooka
300f37afc0 Do not process linkmaps if there is exactly one link map present
(i.e. there is no ld.so).  Makes statically linked rump kernels work on
glibc (at least for me).

based on some discussion with Justin Cormack
2014-03-13 11:21:54 +00:00
justin
cf83766ecf Revert conversion to __thread as breaks on archs without TLS support 2014-03-10 22:37:51 +00:00
justin
587ef2949a Use __thread rather than pthread_getspecific for rumpuser curlwp.
This has better performance and curlwp is a performance bottleneck
in rump kernel code.
2014-03-09 23:01:11 +00:00
pooka
8a7d14d1c2 Fix locking SNAFU.
Is someone can explain why the code worked for 3+ years with multiple
different pthread implementations, I'll buy you a banana.
2014-02-28 13:55:36 +00:00
pooka
a2867970a4 emulate printflike properly to avoid fatal error on clang 2014-02-25 20:58:18 +00:00
pooka
613311d8d7 remember to commit this file too 2014-02-20 01:24:49 +00:00
pooka
fb8e281673 make implementation of rumpuser_kill() match the documentation 2014-02-20 00:44:20 +00:00
pooka
64a85ea946 document rumpuser_kill() 2014-02-20 00:43:26 +00:00
pooka
437e54a701 Translate signal numbers between rump kernel and (POSIX) host. 2014-02-20 00:42:27 +00:00
pooka
177c2413c9 minor clarification: rumpuser_thread_create() is used to create the host
thread context for kernel threads, never for application threads.

per discussion with justin
2014-02-14 00:33:51 +00:00
pooka
8d2ee87e24 Do not force _FILE_OFFSET_BITS=64 here. It's no longer strictly speaking
required (rumpuser interface no longer uses off_t) and force-defining
it causes foo() to magically become foo64() on glibc (even on 64bit
platforms).
2014-01-16 16:03:33 +00:00
pooka
29316c504c Make setprogname() a nop where it's not supported. 2014-01-15 16:53:15 +00:00
pooka
2b361b10dd remove obsolete definitions 2014-01-08 11:04:47 +00:00
pooka
6459f6aa95 do as the comment says and #if defined(every_other) || defined(platform) || ...
===> #if !defined(__NetBSD__)
2014-01-08 01:47:31 +00:00
pooka
f67143f64b OpenBSD support
from Justin Cormack via github
2014-01-08 01:45:29 +00:00
pooka
55ffc8641a Do not export symbols which don't need to be exported.
via Justin Cormack
2013-12-31 00:25:17 +00:00
pooka
cbbcae5f8b remove outdated comment (since quite a few months ago) 2013-12-18 20:24:04 +00:00
pooka
9f9913cebe Workaround a gcc -Wuninitilized whine
github/buildrump.sh issue #44
2013-11-01 23:22:13 +00:00
pooka
d3852222c9 Oh, stdint.h isn't written with a comma ... 2013-10-30 13:08:14 +00:00
pooka
e5aed19d72 need to include stdint.h before rump/rumpuser.h 2013-10-30 12:55:53 +00:00
pooka
079cd2100d glibc on MIPS uses the same DYN d_ptr variant as NetBSD and musl.
from Justin Cormack
2013-10-30 12:30:32 +00:00
rmind
d60eb8c12f librumpuser: add some #ifdef __APPLE__ and missing bits to build it on OS X.
OK pooka@
2013-10-27 16:39:46 +00:00
rmind
0f412aba18 Give RUMP mutex and rwlock their own cache-line. Also give a separate
cache-line for the rwlock's reader counter.
2013-09-26 00:41:51 +00:00
rmind
72b022939e rumpuser_rwlock: replace internal pthread_spin_lock (for protecting reader
count) with atomic operations.  As pthread_spin_lock is not adaptive lock, it
can have hugely negative impact if contended here, especially with priority
inversions.  Now contended rwlock(9) no longer falls flat in RUMP kernels.
2013-09-24 23:45:16 +00:00
pooka
4be69cd08b If pthread_create() fails with EAGAIN, try a few more times with short
sleeps in between.  If it helps, good.  If it doesn't, oh well, at
least we tried.  pthread_create() returning EAGAIN has been observed in
real life at least on Linux (buildrump.sh issue #40)
2013-09-23 10:35:20 +00:00
pooka
b3e8687dfb more platform-specific qualifiers 2013-09-10 17:58:39 +00:00
pooka
6cd40f3fba Install rumpuser_port.h 2013-09-10 16:51:24 +00:00
pooka
e9fe155c86 Change the default value of rump kernels CPUs to 2. It used to be
the number of host cores, but that value is overkill for most uses,
especially with massively multicore hosts.  Dozens of useless virtual
CPUs are relatively speaking expensive in terms of bootstrap time and
memory footprint.  On the other end of the spectrum, defaulting to 2
might shake out some bugs from the qemu test runs.
2013-08-14 08:29:25 +00:00
pooka
f3adf1e54f comment polish: just musl 2013-07-30 18:56:03 +00:00
pooka
aaf7a23bf7 Decide ET_DYN behavior based on __GLIBC__ instead of __linux__,
e.g. musl libc doesn't follow glibc behavior.

per discussions with a number of people
2013-07-30 18:48:51 +00:00
njoly
f2bb7e6625 Use <major>.<minor> for NetBSD version. 2013-07-22 12:36:56 +00:00
pooka
3fcbbf6450 TIMEVAL_TO_TIMESPEC (for musl)
from Justin Cormack
2013-07-22 08:58:31 +00:00
pooka
40fd6d6fa3 Fixes when compiling against musl libc.
from Justin Cormack via private email
2013-07-20 18:46:15 +00:00
pooka
f768d01c4f Fix build where compiler can throw an array-bounds error and
code is built with NDEBUG
	or
	platform's assert is not __dead
2013-07-18 12:28:26 +00:00
pooka
69c4f929cd FreeBSD does the Solaris-like map->l_addr boogie.
from Ben Gras
2013-06-04 15:17:28 +00:00
wiz
890db9708a More markup, less typos. 2013-05-15 22:09:32 +00:00
pooka
03395b4cf5 also, bsd.own.mk to pick up mk.conf 2013-05-15 20:47:20 +00:00
pooka
5666bf4b73 Make it possible for external parties to specify additional dplibs.
This is useful for example on platforms which require -ldl.
2013-05-15 20:27:00 +00:00
pooka
907ce8379e Improve documentation on the locking order of cv_wait mtx/cpu. 2013-05-15 17:53:09 +00:00
pooka
3306a659de Add a generalized rumpuser_syncfd() call which allows the caller
to request a sync or a barrier for fd.
2013-05-15 15:57:01 +00:00
pooka
601de6b09f Pass off_t over the hypercall interface as int64_t to avoid potential
problems in setups where off_t doesn't want to be 64bit.

I'm already excitedly waiting for 128bit off_t and _LARGE_LARGE_FILES
2013-05-15 14:58:24 +00:00
pooka
15dc8bf975 Pass enums over the hypercall interface as ints to avoid some
pathological scenarios from arising in setups where enums might be
of a different size in the rump kernel and hypervisor.
2013-05-15 14:52:49 +00:00
pooka
d0d5069c1a Add RUMPUSER_LWP_CLEAR instead of overloading RUMPUSER_LWP_SET.
This simplifies some alternative hypervisor implementations.
2013-05-15 14:07:26 +00:00
pooka
af9586a1db need the rw_downgrade/tryupgrade methods too 2013-05-07 16:40:31 +00:00
pooka
c0e1ad2997 update to recent interface changes 2013-05-07 15:37:05 +00:00
pooka
059f8df6f9 include stdint.h before rumpuser.h (on some platforms it doesn't get
there automagically)
2013-05-07 15:18:35 +00:00