| #
ac02e870 |
| 29-Jan-2020 |
kamil <kamil@NetBSD.org> |
Revert previous
Two assignments are correct.
|
| #
0b0b4cd4 |
| 29-Jan-2020 |
kamil <kamil@NetBSD.org> |
Do not set stackbase2 twice for !__MACHINE_STACK_GROWS_UP
|
| #
a15e545e |
| 28-Jan-2020 |
ad <ad@NetBSD.org> |
pthread_join(): add a temporary hack to make lib/libpthread/t_detach pass. The correct fix is to do this in kernel (I have that change, but it's part of the wider change to index LWPs in a tree).
|
| #
cd1754ab |
| 27-Jan-2020 |
ad <ad@NetBSD.org> |
pthread_detach(), pthread_join(): go back to using _lwp_detach() and _lwp_wait(), rather than doing it all in userspace. There's less to go wrong. Doesn't seem to be a performance penalty.
|
| #
047ca71b |
| 25-Jan-2020 |
ad <ad@NetBSD.org> |
pthread_exit(): it looks there there is at least one path through which a thread can exit with waiters still hanging off it (cancellation when waiting on a condvar) so deal with all/any crappy failur
pthread_exit(): it looks there there is at least one path through which a thread can exit with waiters still hanging off it (cancellation when waiting on a condvar) so deal with all/any crappy failure like that and make sure there are never any waiters left before exiting. Maybe of help for:
PR: bin/50350: rump/rumpkern/t_sp/stress_{long,short} fail on Core 2
show more ...
|
| #
edf01486 |
| 25-Jan-2020 |
ad <ad@NetBSD.org> |
- Fix a race between the kernel and libpthread, where a new thread can start life without its self->pt_lid being filled in.
- Fix an error path in _lwp_create(). If the new LID can't be copied ou
- Fix a race between the kernel and libpthread, where a new thread can start life without its self->pt_lid being filled in.
- Fix an error path in _lwp_create(). If the new LID can't be copied out, then get rid of the new LWP (i.e. either succeed or fail, not both).
- Mark l_dopreempt and l_nopreempt volatile in struct lwp.
show more ...
|
| #
51002188 |
| 13-Jan-2020 |
ad <ad@NetBSD.org> |
Rip out some very ambitious optimisations around pthread_mutex that are don't buy much. This stuff is hard enough to get right in the kernel let alone userspace, and I don't trust that it's right.
|
| #
939c050d |
| 05-Mar-2019 |
christos <christos@NetBSD.org> |
Transfer all the keys that were created in the libc stub implementation to the pthread tsd implementation when the main thread is created. This corrects a problem where a process created keys before
Transfer all the keys that were created in the libc stub implementation to the pthread tsd implementation when the main thread is created. This corrects a problem where a process created keys before libpthread was loaded (either from the libc constructor or because libpthread was dlopened later). This fixes a problem with jemalloc which creates keys in the constructor.
show more ...
|
| #
66f17364 |
| 19-Aug-2018 |
kamil <kamil@NetBSD.org> |
Drop a duplicate instruction line
No functional change intended.
|
| #
85d957d4 |
| 08-Dec-2017 |
kre <kre@NetBSD.org> |
Deal with more lwp_park() timestamp unconsting
|
| #
e5678be8 |
| 11-Jul-2017 |
joerg <joerg@NetBSD.org> |
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This functions are used for destructors of thread_local objects.
If a pending destructor exists, prevent unloading of shared objects. Intr
Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This functions are used for destructors of thread_local objects.
If a pending destructor exists, prevent unloading of shared objects. Introduce __dl_cxa_refcount interface for this purpose. When the last reference is gone and the object has been dlclose'd before, the unloading is finalized.
Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists on providing __cxa_thread_atexit as direct wrapper without further patching.
show more ...
|
| #
d3a99cd5 |
| 02-Jul-2017 |
joerg <joerg@NetBSD.org> |
Do not look at environmental variables for suid/guid binaries.
|
| #
5f391f4a |
| 02-Jul-2017 |
joerg <joerg@NetBSD.org> |
Export the guard size of the main thread via vm.guard_size. Add a complementary writable sysctl for the initial guard size of threads created via pthread_create. Let the existing attribut accessors d
Export the guard size of the main thread via vm.guard_size. Add a complementary writable sysctl for the initial guard size of threads created via pthread_create. Let the existing attribut accessors do the right thing. Raise the default guard size for threads to 64KB.
show more ...
|
| #
cb27e655 |
| 29-May-2015 |
christos <christos@NetBSD.org> |
Fix previous: Can't use calloc/malloc before we complete initialization of the thread library, because malloc uses pthread_foo_specific, and it will end up initializing itself incorrectly.
|
| #
841339f0 |
| 29-May-2015 |
manu <manu@NetBSD.org> |
Make PTHREAD_KEYS_MAX dynamically adjustable
NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to other systems like Linux (1024) or MacOS X (512). As a result some setups tested on Lin
Make PTHREAD_KEYS_MAX dynamically adjustable
NetBSD's PTHREAD_KEYS_MAX is set to 256, which is low compared to other systems like Linux (1024) or MacOS X (512). As a result some setups tested on Linux will exhibit problems on NetBSD because of pthread_keys usage beyond the limit. This happens for instance on Apache with various module loaded, and in this case no particular developper can be blamed for going beyond the limit, since several modules from different sources contribute to the problem.
This patch makes the limit conigurable through the PTHREAD_KEYS_MAX environement variable. If undefined, the default remains unchanged (256). In any case, the value cannot be lowered below POSIX-mandated _POSIX_THREAD_KEYS_MAX (128).
While there: - use EXIT_FAILURE instead of 1 when calling err(3) in libpthread. - Reset _POSIX_THREAD_KEYS_MAX to POSIX mandated 128, instead of 256.
show more ...
|
| #
082d249a |
| 16-Dec-2014 |
pooka <pooka@NetBSD.org> |
Allow for arbitrary MI scheduler implementations.
A concrete result is enabling unpatched libpthread to run on the rumprun stacks (e.g. Xen and bare metal) with a non-NetBSD scheduler. Those schedul
Allow for arbitrary MI scheduler implementations.
A concrete result is enabling unpatched libpthread to run on the rumprun stacks (e.g. Xen and bare metal) with a non-NetBSD scheduler. Those schedulers hook into the existing _lwp_frobnitz() NetBSD syscall interfaces (well, "syscall" interfaces in that scenario ;)
More specifically about the change itself:
1) instead of calling _lwp_makecontext() followed by _lwp_create() and passing the entry point in ucontext_t (MD) through the calls, roll the calls into pthread__makelwp() and allow alternate implementations for that MI interface.
2) allow compile-time overriding of __lwp_gettcb_fast() or __lwp_getprivate_fast, which are inline and leak MD scheduler/thread details into libpthread
Additionally, two small nits:
I) define LIB=pthread before including mk.conf so that it's possible to test for LIB==pthread in mk.conf
II) make it possible to leave out pthread_cancelstub.c. This is required by the current implementation of rumprun-posix (i.e. rumprun on POSIX hosts) due to symbol collisions. It needs to be fixed properly some day, but for now allows an almost-correct libpthread to run. I am sure @justin will be happy to explain the details ;)
no change to NetBSD tested: anita+atf
show more ...
|
| #
cdce479a |
| 31-Jan-2014 |
christos <christos@NetBSD.org> |
remove compatibility code for handling CLOCK_MONOTONIC and handle it in the syscall directly.
|
| #
71d484f9 |
| 21-Mar-2013 |
christos <christos@NetBSD.org> |
- Allow libpthread to be dlopened again, by providing libc stubs to libpthread. - Fail if the dlopened libpthread does pthread_create(). From manu@ - Discussed at length in the mailing lists; approve
- Allow libpthread to be dlopened again, by providing libc stubs to libpthread. - Fail if the dlopened libpthread does pthread_create(). From manu@ - Discussed at length in the mailing lists; approved by core@ - This was chosen as the least intrusive patch that will provide the necessary functionality. XXX: pullup to 6
show more ...
|
| #
2bf5f9db |
| 01-Jan-2013 |
dsl <dsl@NetBSD.org> |
Don't rely on sys/lwp.h includeing sys/resource.h for us.
|
| #
cb292d56 |
| 14-Nov-2012 |
christos <christos@NetBSD.org> |
add argsused
|
| #
9d94c026 |
| 06-Nov-2012 |
apb <apb@NetBSD.org> |
Remove duplicate "const" modifier found by clang -Wduplicate-decl-specifier
|
| #
d79b47c3 |
| 03-Nov-2012 |
rmind <rmind@NetBSD.org> |
libpthread: replace the use of obsolete sys/tree.h interface with rbtree(9).
|
| #
284dc1a8 |
| 03-Nov-2012 |
christos <christos@NetBSD.org> |
cast return of sysconf
|
| #
b0ce37c2 |
| 15-Aug-2012 |
drochner <drochner@NetBSD.org> |
return errno if pthread_create hits the system limit, not just -1 (this is not entirely correct because it can return ENOMEM which is not mentioned in the spec, but there are other places in pthread_
return errno if pthread_create hits the system limit, not just -1 (this is not entirely correct because it can return ENOMEM which is not mentioned in the spec, but there are other places in pthread_create whete ENOMEM is returned -- it at all, this should be fixed everywhere)
show more ...
|
| #
0645d95b |
| 02-Aug-2012 |
joerg <joerg@NetBSD.org> |
Prefer sysconf to obtain number of CPUs.
|