Age | Commit message (Collapse) | Author | |
---|---|---|---|
2012-06-21 | Update to reflect API changes | Philip Guenthe | |
2012-06-21 | __tfork() needs to set the stack address of the new thread in the kernel, | Philip Guenthe | |
so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@ | |||
2012-05-06 | Style nits from Brad. | Paul Irofti | |
2012-05-03 | Add pthread spinlock support. | Paul Irofti | |
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@. | |||
2012-04-23 | Honor subsystem style. | Paul Irofti | |
`Visual inspection looks ok' kurt@. >From Brad | |||
2012-04-17 | Remove "#define _POSIX_THREADS" line before include <pthread.h>. | Miod Vallat | |
The latter contains "#define _POSIX_THREADS 1" which makes gcc 2.95 complain. | |||
2012-04-14 | Add new mutex type, PTHREAD_MUTEX_STRICT_NP which checks for application | Kurt Miller | |
errors similar to PTHREAD_MUTEX_ERRORCHECK, however upon error it aborts. The rational is that many applications don't check the return values on pthread functions and will miss the errors that ERRORCHECK returns. PTHREAD_MUTEX_STRICT_NP will be our default mutex type for awhile okay guenther@ dcoppa@ | |||
2012-04-13 | Provide _atomic_lock() and __cerror() for hppa64. Makes hppa64 build again. | Joel Sing | |
2012-04-13 | Use PTHREAD_MUTEX_DEFAULT in static init and mutexattr_init. If the | Kurt Miller | |
default mutex type changes to NORMAL, when there is an uninitialized mutex provided to unlock, allow it to succeed similar to an unlocked mutex. For other cases abort instead of segfault. okay guenther@ | |||
2012-04-13 | Per POSIX, PTHREAD_MUTEX_NORMAL type mutexes have undefined behavior for | Kurt Miller | |
certain conditions. In the case of unlocking an unlocked mutex we will allow that to succeed, all other undefined behaviors will result in an immediate abort(). okay guenther@ | |||
2012-04-13 | Add sigwaitinfo and sigtimedwait stubs under #if 0; a bit more kernel | Philip Guenthe | |
support is needed before they can be usefully enabled but I don't want to misplace this diff yet again | |||
2012-04-12 | remove rfork(); ok guenther miod | Theo de Raadt | |
2012-04-11 | Minor bump after my previous commit. Noticed by deraadt@. | Paul Irofti | |
2012-04-11 | Add pthread barrier support. | Paul Irofti | |
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@. | |||
2012-04-10 | pthread_setcanceltype() shouldn't be a cancelation point | Philip Guenthe | |
ok kurt@ | |||
2012-04-06 | Fix typo. | Joel Sing | |
2012-03-22 | Remove pthread_suspend* and related functions. This is part of the | Kurt Miller | |
rthreads major library bump from last night. okay kettenis@ | |||
2012-03-22 | bump majors on libc and rthreads for the additions to libc and transfer | Philip Guenthe | |
of __tfork_thread from rthreads to libc | |||
2012-03-22 | closefrom() should be a cancellation point | Philip Guenthe | |
2012-03-22 | tfork_thread has been moved to libc | Philip Guenthe | |
2012-03-22 | Move __tfork_thread() from rthreads (libpthread) to libc so that | Philip Guenthe | |
it can be used for not-strictly-threading purposes ok matthew@ kurt@ | |||
2012-03-20 | Clean up unnecessary prototypes. Pointed out by brad@ | Philip Guenthe | |
2012-03-20 | Permit recursive locking in _rthread_dl_lock(), as an so's destructor | Philip Guenthe | |
may need to call dlclose(). problem observed by Antti Harri (iku at openbsd.fi), ok kurt@ | |||
2012-03-14 | Force sched_yield() to be resolved before calling dlctl(DL_SET*LCK) with | Philip Guenthe | |
a function that can call sched_yield(), to avoid recursion ok kurt@ kettenis@ | |||
2012-03-13 | Don't trust the environment if issetugid() | Philip Guenthe | |
2012-03-03 | Sync the assembly statements with <machine/lock.h> for consistency. | Miod Vallat | |
2012-03-03 | Bump minor for recent additions | Philip Guenthe | |
2012-03-03 | sem_timedwait() should return ETIMEDOUT instead of EWOULDBLOCK on timeout | Philip Guenthe | |
2012-03-03 | Add sem_timewait() and fix sem_wait()'s handling of signals, so | Philip Guenthe | |
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. | |||
2012-03-02 | fix check when setting the contention scope. harmless atm but still wrong. | Federico G. Schwindt | |
guenther@ ok. | |||
2012-03-02 | for readability, put the label on it's own line. | Federico G. Schwindt | |
2012-03-02 | _SPINLOCK_UNLOCKED isn't zero everywhere (*cough*hppa*cough*), so | Philip Guenthe | |
sem_init() can't assume that calloc will leave the embedded spinlock in the unlocked state ok miod@ otto@ | |||
2012-02-28 | Our default mutex type is PTHREAD_MUTEX_ERRORCHECK, for which trying | Philip Guenthe | |
to unlock an uninitialized mutex is required to return EPERM, so add the necessary checks. For recursive mutexes, return an error from pthread_mutex_lock() if the count would overflow. problem observed in glib testing by aja@ | |||
2012-02-27 | fix __errno symbol name | Miod Vallat | |
2012-02-26 | Fix buglets. | Miod Vallat | |
2012-02-26 | __cerror gets invoked with errno in v0, not a0. | Miod Vallat | |
2012-02-26 | Fix label for threaded binaries to link. | Miod Vallat | |
2012-02-24 | sched_yield() is the standard name while pthread_yield() is the | Philip Guenthe | |
non-standard alias, so prefer the former | |||
2012-02-23 | PTHREAD_MUTEX_NORMAL mutexes are supposed to self-deadlock, not abort. | Philip Guenthe | |
That deadlock can be exited via a timeout for pthread_mutex_timedlock(). Unwind all the state when pthread_mutex_timedlock() times out | |||
2012-02-23 | Add pthread_condattr_{get,set}clock(), requested by aja@ | Philip Guenthe | |
Add pthread_mutex_timedlock(), requested by dcoppa@ | |||
2012-02-21 | Make pthread_suspend_np() and pthread_resume_np() simply fail instead | Philip Guenthe | |
of doing the Wrong Thing. | |||
2012-02-19 | Fix problems revealed by regress/lib/libpthread/stack/stack.c | Philip Guenthe | |
2012-02-19 | Use 'base' as an intermediate char* variable to avoid void* arithmetic | Philip Guenthe | |
2012-02-19 | Extend miod's fix CFLAGS fix to all gcc2 platforms (suggested by Tobias | Philip Guenthe | |
Ulmer). Only pull in bsd.lib.mk once to avoid linking objects twice | |||
2012-02-19 | Use a form of designated initializer that works with gcc2 | Philip Guenthe | |
lint doesn't understand designated initializers, so hide them from it | |||
2012-02-19 | Validate in pthread_attr_set{scope,sched{param,policy},inheritsched}() | Philip Guenthe | |
the requested new value | |||
2012-02-18 | Fix previous commit: _rthread_init() was static. | Philip Guenthe | |
Improve consistency of error naming | |||
2012-02-18 | Before using _thread_pagesize, make sure _rthread_init() has been called | Philip Guenthe | |
2012-02-18 | id tag. | Federico G. Schwindt | |
2012-02-18 | Fix the handling of the stackaddr, stacksize, and guardsize attributes: | Philip Guenthe | |
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@ |