summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_rwlock.c
Commit message (Collapse)AuthorAgeFilesLines
* Add compatibility symbol maps. libpthread (.so.1 and .so.2)deischen2006-03-131-0/+19
| | | | | | | | | | | used LIBTHREAD_1_0 as its version definition, but now needs to define its symbols in the same namespace used by libc. The compatibility hooks allows you to use libraries and binaries built and linked to libpthread before libc was built with symbol versioning. The shims can be removed if libpthread is given a version bump. Reviewed by: davidxu
* Add a simple work-around for deadlocking on recursive read locksdeischen2004-01-081-47/+81
| | | | | | | | | | on a rwlock while there are writers waiting. We normally favor writers but when a reader already has at least one other read lock, we favor the reader. We don't track all the rwlocks owned by a thread, nor all the threads that own a rwlock -- we just keep a count of all the read locks owned by a thread. PR: 24641
* Add small piece of code to support pthread_rwlock_timedrdlock anddavidxu2003-09-061-8/+43
| | | | pthread_rwlock_timedrwlock.
* Attempt to eliminate PLT relocations from rwlock aquire/releasekan2003-05-301-14/+19
| | | | | | | | | | | path, making them suitable for direct use by the dynamic loader. Register libpthread-specific locking API with rtld on startup. This still has some rough edges with signals which should be addresses later. Approved by: re (scottl)
* Revamp libpthread so that it has a chance of working in an SMPdeischen2003-04-181-60/+64
| | | | | | | | | | | | | | | | | | | environment. This includes support for multiple KSEs and KSEGs. The ability to create more than 1 KSE via pthread_setconcurrency() is in the works as well as support for PTHREAD_SCOPE_SYSTEM threads. Those should come shortly. There are still some known issues which davidxu and I are working on, but it'll make it easier for us by committing what we have. This library now passes all of the ACE tests that libc_r passes with the exception of one. It also seems to work OK with KDE including konqueror, kwrite, etc. I haven't been able to get mozilla to run due to lack of java plugin, so I'd be interested to see how it works with that. Reviewed by: davidxu
* Backout last commit.davidxu2003-03-151-1/+1
| | | | Requested by: jhb
* Fix a bug in rwlock. When a rwlock was locked by reader threads, adavidxu2003-03-141-1/+1
| | | | writter thread can block reader threads to get read lock.
* Make the changes needed for libpthread to compile in its new home.mini2002-09-161-1/+1
| | | | | | | | The new libpthread will provide POSIX threading support using KSE. These files were previously repo-copied from src/lib/libc_r. Reviewed by: deischen Approved by: -arch
* Fix the return code from pthread_rwlock_try[rw|rd]lock() functions;bsd2002-03-151-2/+2
| | | | | | these should return EBUSY when the calling thread would block. MFC after: 2 weeks
* To be consistent, use the __weak_reference macro from <sys/cdefs.h>deischen2001-04-101-7/+7
| | | | | | instead of #pragma weak to create weak definitions. Suggested by: bde
* Add weak definitions for wrapped system calls. In general:deischen2001-01-241-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | _foo - wrapped system call foo - weak definition to _foo and for cancellation points: _foo - wrapped system call __foo - enter cancellation point, call _foo(), leave cancellation point foo - weak definition to __foo Change use of global _thread_run to call a function to get the currently running thread. Make all pthread_foo functions weak definitions to _pthread_foo, where _pthread_foo is the implementation. This allows an application to provide its own pthread functions. Provide slightly different versions of pthread_mutex_lock and pthread_mutex_init so that we can tell the difference between a libc mutex and an application mutex. Threads holding mutexes internal to libc should never be allowed to exit, call signal handlers, or cancel. Approved by: -arch
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Removed some variable initializations which were unnecessary and divergentalex1998-09-071-6/+6
| | | | from style(9).
* -Wall clean.alex1998-09-071-1/+3
|
* Implement pthread read/write locks as defined by Version 2 of the Singlealex1998-09-071-0/+333
UNIX Specification. As with our standard mutexes, process shared locks are not supported at this time.
OpenPOWER on IntegriCloud