| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Implementation, documentation and naive regression tests for:
- pthread_spin_init()
- pthread_spin_destroy()
- pthread_spin_lock()
- pthread_spin_trylock()
- pthread_spin_unlock()
Implementation okay guenther@, documentation okay jmc@.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implementation and documentation for:
- pthread_barrier_init()
- pthread_barrier_destroy()
- pthread_barrier_wait()
- pthread_barrierattr_init()
- pthread_barrierattr_destroy()
- pthread_barrierattr_getpshared()
- pthread_barrierattr_setpshared()
Currently only private barriers are supported.
Okay guenther@.
|
|
|
|
| |
rthreads major library bump from last night. okay kettenis@
|
|
|
|
|
|
|
| |
that it resumes waiting unless the thread was canceled. As part
of this, change the internal _sem_wait() function to return zero
on success and an errno value on failure instead of 1 on success
and zero on failure.
|
|
|
|
| |
Add pthread_mutex_timedlock(), requested by dcoppa@
|
|
|
|
| |
Improve consistency of error naming
|
|
|
|
|
|
|
|
|
|
|
| |
don't try to merge values, round the sizes separately, and don't try to
unmap application-supplied stacks.
Copy from uthread the caching of default-sized stacks.
Have pthread_attr_init() and pthread_create() get the default attributes
from staticly allocated pthread_attr_t.
Cache the pagesize in _rthread_init() and provide a macro for rounding to it
based on suggestions from kettenis@ and tedu@, ok kettenis@
|
|
|
|
|
|
| |
pthread_mutexattr_{get,set}kind_np()
tweaked diff from brad
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
particularly the "consume the signal you just sent" hang, and putting
the wait queues in userspace.
Do cancellation handling in pthread_cond_*wait(), pthread_join(),
and sem_wait().
Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add
'abort" argument to thrsleep to close cancellation race; make
thr{sleep,wakeup} return errno values via *retval to avoid touching
userspace errno.
|
|
|
|
|
|
|
| |
new file rthread_mutexattr.c. Add basic implementations of
pthread_mutexattr_{set,get}{protocol,prioceiling}
Requested by aja
|
|
|
|
|
|
| |
using previously allocated SIGTHR to interrupt in-process syscalls
and fixing the spelling of "cancelled" along the way.
Modeled on FreeBSD's libthr
|
|
|
|
| |
Requested by many to ease substitution of librthread for libpthread
|
| |
|
|
|
|
|
| |
errno. The ASM bits for _cerror are sketchy or missing for some archs
but that can be corrected in-tree.
|
|
|
|
|
|
| |
race condition and prep for later support of pthread_condattr_setclock()
"get it in" deraadt@, tedu@, cheers by others
|
|
|
|
|
|
|
| |
and struct timespec * argument. sigtimedwait is just a one line
wrapper after this.
"get it in" deraadt@, tedu@, cheers by others
|
|
|
|
|
|
|
|
|
|
| |
kernel so that librthread can detect when a thread is completely
done with its stack without need a kqueue. The dying thread moves
itself to a GC list, other threads scan the GC list on pthread_create()
and pthread_join() and free the stack and handle once the thread's
thread id is zeroed.
"get it in" deraadt@, tedu@, cheers by others
|
|
|
|
| |
ok kurt@
|
|
|
|
|
| |
64bit archs to accommodate the growing number of ports that put large
buffers on the stack. Supported by many with no objections.
|
|
|
|
|
|
| |
finally reading the lint warnings (sigh)
ok tedu@
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
signal is already pending in the calling thread or the main thread
and there's no longer a race condition where the signal could be
diverted but sigwait() would still block. There were some off-by-one
errors too.
(The checking of the main thread's pending list is just until a
pending list for the process can be added to struct process. For
now, such signals end up as pending on the main thread.)
oks tedu@ and art@
|
|
|
|
|
|
|
|
|
|
|
| |
- Make an effort to protect important libc and ld.so critical areas during
the fork(2)/vfork(2) sys call.
- Add pthread_atfork(3) implementation based on Daniel Eischen's code.
Original diff by Philip Guenther <guenther at gmail.com> with some
additions and refinements by me. Positive test report from brad@ with
many kde apps. fork(2) and pthread_atfork(3) pthread regresses pass.
okay tedu@, kettenis@, marc@
|
|
|
|
|
|
| |
Minor tweaks to compile with the above, primarily in fixing
the conflicts between semaphore.h and rthread.h
"i like the additional warnings" tedu@
|
|
|
|
| |
not use a separate reaper thread. ok tedu@ marc@
|
|
|
|
|
|
|
|
| |
size (and guard zone size) to be set using pthread_attr. Guard
zones are specified in bytes, but implemented in terms of a
page size.
OK Otto@
|
|
|
|
|
|
|
|
|
| |
_rthread_debug(3, "foo = %s", foo);
where output is to stderr and will only be printed if the current
debug level is >= 3. Messages with a debug level of 0 are always
printed. The level can be set from the environment (not enabled yet)
or with gdb by modifying variable _rthread_debug_level.
"Fine with me" -Otto
|
|
|
|
|
| |
With this, java seems to be operational. Also make threads_ready
non-static, which is needed for an upcoming diff. ok tedu@
|
|
|
|
| |
and fix a bug in thread creation error path. ok tedu@
|
|
|
|
| |
update for new thrwakeup that takes a count argument
|
|
|
|
| |
interfaces that aren't static, and a few that are but which will change
|
|
|
|
|
| |
Help deraadt, tedu, kettenis
Ok tedu, kettenis
|
| |
|
|
|
|
| |
add pthread_get/set_stack[addr] (info not used yet)
|
| |
|
|
|
|
| |
but some of the functions are here now.
|
|
|
|
| |
possible
|
| |
|
|
|
|
| |
value if there are no waiters.
|
|
|