freebsd-dev/lib/libthr/thread
Mike Makonnen c40bafac85 Implement reference counting of read-write locks. This uses
a list in the thread structure to keep track of the locks and
how many times they have been locked. This list is checked
on every lock and unlock. The traversal through the list is
O(n). Most applications don't hold so many locks at once that
this will become a problem. However, if it does become a problem
it might be a good idea to review this once libthr is
off probation and in the optimization cycle.
This fixes:
	o deadlock when a thread tries to recursively acquire a
	  read lock when a writer is waiting on the lock.
	o a thread could previously successfully unlock a lock it did not own
	o deadlock when a thread tries to acquire a write lock on
	  a lock it already owns for reading or writing [ this is admittedly
	  not required by POSIX, but is nice to have ]
2004-01-19 14:51:45 +00:00
..
Makefile.inc o Add a wrapper around sigaction(2), so we can insert our own wrapper 2003-12-09 11:04:36 +00:00
thr_attr.c
thr_autoinit.c Make WARNS2 clean. The fixes mostly included: 2003-05-23 09:48:20 +00:00
thr_cancel.c Change all instances of THR_LOCK/UNLOCK, etc to UMTX_*. 2003-07-06 10:18:48 +00:00
thr_clean.c - Define curthread as _get_curthread() and remove all direct calls to 2003-04-02 03:05:39 +00:00
thr_concurrency.c Add stub implementations of pthread_[gs]etconcurrency to libc_r and 2003-04-20 01:53:13 +00:00
thr_cond.c Fix the wrapper function around signals so that a signal handling 2003-12-09 11:12:11 +00:00
thr_condattr_destroy.c
thr_condattr_init.c
thr_create.c Preparations to make libthr work in multi-threaded fork()ing applications. 2003-12-26 08:16:17 +00:00
thr_detach.c Change all instances of THR_LOCK/UNLOCK, etc to UMTX_*. 2003-07-06 10:18:48 +00:00
thr_equal.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_exit.c Implement reference counting of read-write locks. This uses 2004-01-19 14:51:45 +00:00
thr_find_thread.c Part of the last patch. 2003-05-25 08:35:37 +00:00
thr_gc.c Change all instances of THR_LOCK/UNLOCK, etc to UMTX_*. 2003-07-06 10:18:48 +00:00
thr_getprio.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_getschedparam.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_info.c Start locking up the active and dead threads lists. The active threads 2003-05-25 08:31:33 +00:00
thr_init.c Preparations to make libthr work in multi-threaded fork()ing applications. 2003-12-26 08:16:17 +00:00
thr_join.c Change all instances of THR_LOCK/UNLOCK, etc to UMTX_*. 2003-07-06 10:18:48 +00:00
thr_kern.c Make it possible for the library to specify a timeout value when 2003-12-30 08:34:57 +00:00
thr_main_np.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_mattr_init.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_mattr_kind_np.c
thr_multi_np.c
thr_mutex_prioceiling.c - Reenable setschedparam and the prioceiling code now that the mutex code 2003-04-01 22:40:29 +00:00
thr_mutex_protocol.c
thr_mutex.c o Implement pthread_mutex_timedlock(), which does not block indefinitely on 2003-12-30 08:44:55 +00:00
thr_mutexattr_destroy.c
thr_once.c
thr_printf.c _thread_printf() is only used for debugging or in cases where something's 2003-06-09 17:58:15 +00:00
thr_private.h Implement reference counting of read-write locks. This uses 2004-01-19 14:51:45 +00:00
thr_resume_np.c Doh! Lock the thread passed in by the caller, not the current thread. 2003-12-12 09:51:39 +00:00
thr_rwlock.c Implement reference counting of read-write locks. This uses 2004-01-19 14:51:45 +00:00
thr_rwlockattr.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_self.c - Define curthread as _get_curthread() and remove all direct calls to 2003-04-02 03:05:39 +00:00
thr_sem.c - Define curthread as _get_curthread() and remove all direct calls to 2003-04-02 03:05:39 +00:00
thr_seterrno.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_setprio.c - Add libthr but don't hook it up to the regular build yet. This is an 2003-04-01 03:46:29 +00:00
thr_setschedparam.c Comment out most of pthread_setschedparam. Pthread priorities didn't 2003-12-15 12:31:46 +00:00
thr_sig.c Fix the wrapper function around signals so that a signal handling 2003-12-09 11:12:11 +00:00
thr_spec.c - Define curthread as _get_curthread() and remove all direct calls to 2003-04-02 03:05:39 +00:00
thr_spinlock.c Fix the wrapper function around signals so that a signal handling 2003-12-09 11:12:11 +00:00
thr_stack.c Decouple the thread stack [de]allocating functions from the 'dead threads list' 2003-05-26 00:37:07 +00:00
thr_subr.c Ugghh, cvs add the functions necessary to lock the global signal action 2003-12-09 11:06:55 +00:00
thr_suspend_np.c Return ENOTSUP instead of -1. 2004-01-15 16:09:58 +00:00
thr_syscalls.c o Add a wrapper around sigaction(2), so we can insert our own wrapper 2003-12-09 11:04:36 +00:00
thr_yield.c