summaryrefslogtreecommitdiff
path: root/locks
Commit message (Collapse)AuthorAgeFilesLines
* Backport 917837:minfrin2010-03-071-5/+5
| | | | | | | | Use the APR_FOPEN_* constants instead of the deprecated APR_* constants within code outside the file_io code. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@920002 13f79535-47bb-0310-9956-ffa450edef68
* Merge r884144 from trunk:trawick2009-11-251-2/+2
| | | | | | | | Win32 apr_{global,proc}_mutex_name() and apr_{global,proc}_mutex_lockfile() returned the wrong information git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@884152 13f79535-47bb-0310-9956-ffa450edef68
* merge r884139 from trunk:trawick2009-11-251-0/+5
| | | | | | | | | | | add apr_global_mutex_name(), for retrieving the name of the mechanism used by the underlying apr_proc_mutex_t declare NULL as the result for any future mechanisms that don't have an underlying apr_proc_mutex_t or equivalent git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@884141 13f79535-47bb-0310-9956-ffa450edef68
* merge r882915 from trunk:trawick2009-11-211-0/+5
| | | | | | | | add missing apr_global_mutex_lockfile(), corresponding to apr_proc_mutex_lockfile() git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@882916 13f79535-47bb-0310-9956-ffa450edef68
* minor tunejim2009-09-211-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@817255 13f79535-47bb-0310-9956-ffa450edef68
* The mixing doesn't ensure no collisions, so use ajim2009-09-211-12/+18
| | | | | | | sep and standard hashing mech as and additional hasher git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@817253 13f79535-47bb-0310-9956-ffa450edef68
* Remove dependency on apr_md5 for the versions in which it's in apujim2009-09-171-20/+19
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@816274 13f79535-47bb-0310-9956-ffa450edef68
* Using apr-utiljim2009-09-171-1/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@816217 13f79535-47bb-0310-9956-ffa450edef68
* Merge r811455, r813063 from trunk:jim2009-09-101-16/+34
| | | | | | | | | | | | | Allow for passed locknames to be honored with posix-sems. Still maintain posix-sem naming conventions tho! just use it :) Reviewed/backported by: jim git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@813586 13f79535-47bb-0310-9956-ffa450edef68
* Backport r788588 from the trunk.bojan2009-06-261-1/+1
| | | | | | | | Avoid proc mutex failures by checking for both EAGAIN and EWOULDBLOCK. Workaround for long standing Linux/hppa bug. Patch by Stefan Fritsch <sf sfritsch.de>. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@788590 13f79535-47bb-0310-9956-ffa450edef68
* resolve testprocmutex failures on AIX and HP-UX by recognizing EACCEScovener2008-06-261-0/+4
| | | | | | | | in fcntl-based apr_proc_mutex_trylock(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@671955 13f79535-47bb-0310-9956-ffa450edef68
* Simplify handling of z/OS pthread API nuances. Beyond thetrawick2007-11-194-29/+29
| | | | | | | | | | | | | simplification, it fixes a compile error in the call to pthread_yield() on z/OS. Submitted by: David Jones I modified it slightly to use AC_DEFINE() as suggested by jorton. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@596402 13f79535-47bb-0310-9956-ffa450edef68
* Improve WIN32 condition variables fairness by using a generation count. The ↵davi2007-07-121-8/+25
| | | | | | | | | count assures that one thread won't steal wakeups from other threads in the queue. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@555730 13f79535-47bb-0310-9956-ffa450edef68
* Rework the win32 CV code to signal the condition only if one or more threadsdavi2007-06-291-50/+73
| | | | | | | | | | | | | are blocked on the condition variable. If no threads are waiting on the condition variable, nothing happens. This patch also eliminates the thundering-herd problem of the manual-reset event, which (theoretically) wakes up all threads waiting on. Now the behavior of the CV's should be the same on Unix and win32 platforms. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551965 13f79535-47bb-0310-9956-ffa450edef68
* Remove superfluous parentheses. Noticed by Joe Orton.davi2007-06-291-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551964 13f79535-47bb-0310-9956-ffa450edef68
* The use of O_EXCL does help, better fail then use a semaphore not owneddavi2007-06-291-12/+11
| | | | | | | | | by the caller. The O_EXCL flag guarantees the open will fail if the named semaphore already exists and if it fails with EEXIST, a new semaphore name is tried. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@551921 13f79535-47bb-0310-9956-ffa450edef68
* apr_proc_mutex_child_init calls unimplemented OpenMutexW and will fail towrowe2007-06-011-0/+9
| | | | | | | | | | | | | | compile on Windows CE. The patch implements the expected behavior of OpenMutexW by calling CreateMutex (which will open an existing mutex or create one if it doesn't exist) and close the mutex and return an error unless CreateMutex indicated that the mutex already existed. PR: 39858 Submitted by: Curt Arnold <carnold apache.org> Reviewed by: Davi Arnaut git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@543333 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.jorton2006-08-0321-21/+21
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-08-0321-126/+126
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* Fix up Win32-private includes to bring it in line with all other platforms.jerenkrantz2006-07-122-3/+3
| | | | | | | | | | Originally titled: [patch 10/17] include path prefix win32/ Submitted by: John Mark Vandenberg Reviewed by: Will Rowe (concept), Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@421349 13f79535-47bb-0310-9956-ffa450edef68
* Close a kernel layer segfault when the user attempts to lockwrowe2006-03-181-1/+2
| | | | | | | | | | | a critical section after DeleteCriticalSection() has been invoked. There is no protection in the lock/unlock kernel code, so ensure we don't enter the critical section path at all with deleted mutex, and fail instead by attempting to wait on a bad handle, resulting in a less drastic failure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@386780 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_no_tryacquire): Removedjorton2006-03-131-12/+99
| | | | | | | | | | | | | function. (proc_mutex_posix_tryacquire, proc_mutex_sysv_tryacquire, proc_mutex_proc_pthread_tryacquire, proc_mutex_fcntl_tryacquire, proc_mutex_flock_tryacquire): Added functions. PR: 38758 Submitted by: Chris Darroch <chrisd pearsoncmg.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@385523 13f79535-47bb-0310-9956-ffa450edef68
* Usse a future-proof configure check for the robust mutex support:jorton2006-03-011-10/+2
| | | | | | | | | | | | | | * configure.in: Use APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX instead of just checking for pthread_mutexattr_setrobust_np. * build/apr_threads.m4 (APR_CHECK_PTHREAD_ROBUST_SHARED_MUTEX): Add macro. * unix/proc_mutex.c (proc_mutex_proc_pthread_create): Use HAVE_PTHREAD_MUTEX_ROBUST instead of the heuristic test. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@382030 13f79535-47bb-0310-9956-ffa450edef68
* * configure.in: Remove bogus check to test whether definingjorton2006-02-231-2/+10
| | | | | | | | | | | | | | | | _POSIX_THREAD_PRIO_INHERIT makes pthread_mutexattr_setrobust_np available; the former is a POSIX feature test macro and is defined (or not) by unistd.h, not the application. * locks/unix/proc_mutex.c (proc_mutex_proc_pthread_create): Make explicit the assumption that robust mutexes are only used if priority inheritance is supported; this prevents use of robust mutexes with glibc 2.3, which aren't supported for cross-process use. PR: 38442 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@380120 13f79535-47bb-0310-9956-ffa450edef68
* Fix an assert that occurs when you destroy a rwlock on win32 and later clearrooneg2006-01-221-8/+10
| | | | | | | | | | | | | | | | | | | | the pool it was allocated from. Submitted by: Evgueni Brevnov <evgueni.brevnov gmail.com> * locks/win32/thread_rwlock.c (apr_thread_rwlock_destroy): Use apr_pool_cleanup_run to call our cleanup function. (thread_rwlock_cleanup): Put the destruction of the rwlock here instead of in the destructor function. * test/testlock.c (test_thread_rwlocks): Destroy the rwlock explicitly so we can see this kind of problem. * CHANGES: Note change. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@371172 13f79535-47bb-0310-9956-ffa450edef68
* Win32: fix apr_proc_mutex_trylock() to handle WAIT_TIMEOUT,wrowe2005-09-211-0/+3
| | | | | | | | | | | returning APR_EBUSY. Submitted by: Ronen Mizrahi <ronen tversity.com> Reviewed by: wrowe, Henry Jen git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@290766 13f79535-47bb-0310-9956-ffa450edef68
* Refactor Win32 condition variables code to address bugs.wrowe2005-07-221-64/+19
| | | | | | | | | PR: 27654, 34336 Submitted by: Henry Jen <henryjen ztune.net> and E Holyat <eholyat yahoo.com> Reviewed by: wrowe, stoddard git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@224407 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.jerenkrantz2005-02-0421-21/+42
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_posix_create): Drop unnecessaryjorton2005-01-131-3/+3
| | | | | | | casts. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125073 13f79535-47bb-0310-9956-ffa450edef68
* Untabify source. mturk2005-01-101-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124775 13f79535-47bb-0310-9956-ffa450edef68
* Add missing apr_proc_mutex_cleanup function call.mturk2005-01-101-2/+7
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124774 13f79535-47bb-0310-9956-ffa450edef68
* Fixing various compiler errors when compiling against the latest version of ↵bnicholes2004-11-271-1/+1
| | | | | | LibC SDK git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@106767 13f79535-47bb-0310-9956-ffa450edef68
* Remove .cvsignore files.jorton2004-11-183-13/+0
| | | | | | | Tipped-of-by: Uwe Zeisberger git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (apr_proc_mutex_lockfile): Fix build onjorton2004-06-151-2/+8
| | | | | | | platforms without flock. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65200 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (apr_proc_mutex_create): Remove redundantjorton2004-06-141-7/+2
| | | | | | | NULL-initialization of zero-initialized field; remove redundant cast. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65194 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_fcntl_cleanup): Always close thejorton2004-06-141-5/+2
| | | | | | | | file. (proc_mutex_fcntl_create): Don't call _cleanup on file open failure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65193 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_posix_release): Revert previousjorton2004-06-141-1/+3
| | | | | | | change, move ->curr_locked manipulation back inside critical section. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65192 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (apr_proc_mutex_lockfile): Avoid unnecessaryjorton2004-06-141-5/+4
| | | | | | | strcmp calls. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65191 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_proc_pthread_cleanup): Fixjorton2004-06-141-1/+18
| | | | | | | | | | resource leak: destroy the mutex here, if it was ever initialized. (proc_mutex_proc_pthread_create): Destroy the mutexattr object on error paths; ensure that _cleanup destroys the mutex on error paths iff necessary. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65190 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_proc_pthread_cleanup): Fixjorton2004-06-141-4/+4
| | | | | | | | | | memory leakup; always unmap the mmap'ed region. PR: 24049 Submitted by: Kohn Emil Dan <emild cs.technion.ac.il> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65189 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_pthread_create): Don't leak anjorton2004-06-141-0/+1
| | | | | | | fd on mmap failure. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65188 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_posix_cleanup): Ignorejorton2004-06-141-19/+9
| | | | | | | | | | | | interproc->filedes, always close the semaphore. (proc_mutex_posix_create): Don't call cleanup if sem_open failed, don't set interproc->filedes to -1. (proc_mutex_posix_acquire): Simplify error handling. (proc_mutex_posix_release): Simplify. Only clear curr_locked flag on success. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65187 13f79535-47bb-0310-9956-ffa450edef68
* Support POSIX semaphores on LP64 platforms:jorton2004-06-141-4/+4
| | | | | | | | | | | | | | | | * configure.in: Don't disable POSIX semaphore support on LP64 platforms. * include/arch/unix/apr_arch_proc_mutex.h (struct apr_proc_mutex_t): Add a sem_t pointer field. * locks/unix/proc_mutex.c (proc_mutex_posix_create, proc_mutex_posix_cleanup, proc_mutex_posix_acquire, prox_mutex_posix_release): Use the sem_t pointer not the fd for the semaphore. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65185 13f79535-47bb-0310-9956-ffa450edef68
* * include/arch/unix/apr_arch_proc_mutex.h, locks/unix/proc_mutex.c:jorton2004-06-051-15/+15
| | | | | | | Don't define global symbols for the _methods structures. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65165 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_no_child_init): Use single noopjorton2004-06-051-51/+15
| | | | | | | | | _child_init function. (proc_mutex_posix_setup, proc_mutex_proc_pthread_setup, proc_mutex_flock_setup): Remove empty functions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65163 13f79535-47bb-0310-9956-ffa450edef68
* * locks/unix/proc_mutex.c (proc_mutex_flock_child_init): If open()jorton2004-06-051-1/+0
| | | | | | | fails in a child, the lock file should not be unlink()ed. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65162 13f79535-47bb-0310-9956-ffa450edef68
* Drop racy/broken Unix nested mutex implementation; use SUSv3-stylejorton2004-06-041-109/+36
| | | | | | | | | | | | | | | | | | | recursive mutex support if available: * build/apr_threads.m4 (APR_CHECK_PTHREAD_RECURSIVE_MUTEX): New macro. * configure.in: Use it. * include/arch/unix/apr_arch_thread_mutex.h (struct apr_thread_mutex_t): Drop nested mutex tracking fields. * locks/unix/thread_mutex.c (apr_thread_mutex_create): Return ENOTIMPL if lacking recursive mutex support, else create a recursive mutex. (apr_thread_mutex_lock, apr_thread_mutex_unlock, apr_thread_mutex_trylock): Remove nested mutex tracking. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65157 13f79535-47bb-0310-9956-ffa450edef68
* Add the apr_proc_mutex_cleanup function.dreid2004-03-091-0/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64950 13f79535-47bb-0310-9956-ffa450edef68
* Cold but clear here today.dreid2004-02-261-0/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64920 13f79535-47bb-0310-9956-ffa450edef68
* Fix some include paths for the new build systemdreid2004-02-264-5/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64919 13f79535-47bb-0310-9956-ffa450edef68