Age | Commit message (Collapse) | Author | |
---|---|---|---|
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@ | |||
2012-02-18 | Missing cerror bits. | Miod Vallat | |
2012-02-18 | Work around compiler confusion while building rthread.o on vax. | Miod Vallat | |
2012-02-18 | Initialize the scope, policy, and inherit members in pthread_attr_init() | Philip Guenthe | |
so that their pthread_attr_get* don't return bogus values. issue noted and tested by aja@ | |||
2012-02-17 | Allow librthread to build on mips64. | Miod Vallat | |
2012-02-16 | Set __isthreaded in pthread_create() instead of _rthread_init() such that it | Mark Kettenis | |
properly represents whether a process is multi-threaded or not. This fixes a bug where if a forked child would create a new thread we would not set __isthreaded. ok guenther@ | |||
2012-02-15 | Nothing important, just switching from pthreads to rthreads | Philip Guenthe | |
2012-02-15 | Bump major to be current libpthread major +1, so we can switch over cleanly. | Philip Guenthe | |
If we have to revert to user-space threads, we'll do another major bump of libpthread going back | |||
2012-02-15 | Add pthread_rwlockattr_{get,set}pshared() and | Philip Guenthe | |
pthread_mutexattr_{get,set}kind_np() tweaked diff from brad | |||
2012-01-25 | @($*& Merging patches resulted in a line being duplicated instead of | Philip Guenthe | |
moved. Unlocking a spinlock twice is bad, mmkay? | |||
2012-01-17 | Reimplement mutexes, condvars, and rwlocks to eliminate bugs, | Philip Guenthe | |
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. | |||
2012-01-04 | Fix $OpenBSD tag | Philip Guenthe | |
2012-01-04 | Add some sanity checks, set errno accordingly to POSIX and add the named | Martin Pieuchot | |
semaphore stubs already provided by libpthread. We may move them in their own file in the future when we figure out a real implementation. Discussed with and looks ok to guenther@ | |||
2012-01-04 | Split out the semaphore functions. | Martin Pieuchot | |
ok guenther@ | |||
2012-01-04 | Delete some parameter names and extra semicolons that slipped through | Philip Guenthe | |
2011-12-28 | pthread_self() may be much cheaper and never more expensive than getthrid() | Philip Guenthe | |
so prefer it for identifying the current thread | |||
2011-12-27 | Don't let applications block, wait for, or handle SIGTHR, as the | Philip Guenthe | |
thread library uses it internally for cancellation. | |||
2011-12-27 | On failure, pthread_kill() should return the errno, not -1 | Philip Guenthe | |
2011-12-24 | formatting errors, found using freebsd's "igor"; | Jason McIntyre | |
2011-12-22 | Add pthread_mutex_{get,set}prioceiling() | Philip Guenthe | |
2011-12-21 | Split out the pthread_rwlock* and pthread_once() functions from rthread_sync.c | Philip Guenthe | |
to new files rthread_rwlock.c, rthread_rwlockattr.c, and rthread_once.c | |||
2011-12-21 | Split out the pthread_mutexattr_* functions from rthread_sync.c to | Philip Guenthe | |
new file rthread_mutexattr.c. Add basic implementations of pthread_mutexattr_{set,get}{protocol,prioceiling} Requested by aja |