| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905414 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895509 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1895508 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
include/arch/unix/apr_arch_thread_mutex.h: Completely drop the code
required imitate the mutex via a condition variable if
HAVE_PTHREAD_MUTEX_TIMEDLOCK is defined.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1891204 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
APR_THREAD_DEBUG.
* locks/unix/thread_mutex.c (apr_thread_mutex_create): For
APR_THREAD_DEBUG, use the ERRORCHECK mutex type by default (if not
nested/recursive), which reliably fails for cases of otherwise
undefined behaviour:
a) relocking a mutex locked by the current thread
b) unlocking a thread locked by another thread
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878362 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
remove unused local variable.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1878342 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866619 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1866302 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
implement timed unnested apr_thread_mutex_t.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860744 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(apr_thread_mutex_create): Remove Windows 9x compatibility code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860195 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function almost the same as WaitForSingleObject() except it accepts
timeout value in microseconds, instead of milliseconds.
* include/arch/win32/apr_arch_misc.h
* misc/win32/misc.c
(apr_wait_for_single_object): New. Factored out from thread_cond_timedwait().
* locks/win32/proc_mutex.c
* locks/win32/thread_cond.c
* locks/win32/thread_mutex.c
(apr_proc_mutex_timedlock, thread_cond_timedwait,
apr_thread_mutex_timedlock): Use apr_wait_for_single_object().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1860075 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
This fixes PR 45455 and PR 51360.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859584 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On platforms that support pshared and robust pthread mutex, this is usually
the best interprocess mutex mechanism because it's efficient, posix, not
limited and not persistent on the system when the program exits (i.e. no need
to delete it explicitely before leaving, like IPC SysV or files for instance).
Note that on older POSIX systems pthread_mutex_{setrobust,consistent}() funcs
existed with the non-posix _np() suffix, and we consider them equivalent.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856022 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
Fix r1792620's bad copy/paste from mutex code.
Submitted by: fedormsv gmail.com
Reviewed by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1855877 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1839700 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1839699 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
with timed locks, so there is no delta between DEFAULT and DEFAULT_TIMED.
Avoid gratuitous API changes to typical OS lock information.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1797415 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
inherent to some native/OS condvar implementation.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1794266 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Indent block previously preserved (for easier review), no functional change.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1792625 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
inherent to some native/OS condvar implementation.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1792622 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
No functional change.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1792621 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
apr_{proc,thread}_{mutex,cond}_timed{lock,wait}(), such that the given timeout
interval value is not truncated or switched from/to signed/unsigned.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1792620 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Fix proc_mutex_pthread_acquire_ex() for the APR_USE_PROC_PTHREAD_MUTEX_COND
case which shouldn't use undefined pthread_cond_timedwait().
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1791728 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Since proc_pthread_mutex_cond_locked() macro is also used as an lvalue, don't
define it as a conditional and put the condition where needed in the code.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1791718 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
to apr_{thread,proc,global}_trylock(), i.e. immediate attempt to acquire the
lock (but returning APR_TIMEUP if busy).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790632 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
apr_proc_mutex_unix_lock_methods_t's timedacquired method.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790523 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Make it clear in the type that it's a relative/interval time.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790521 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Axe the 'absolute' argument of apr_{thread,proc,global}_mutex_timedlock()
which was confusing, hence 'timeout' is always relative now.
It still makes sense (to me) to handle a negative timeout as INFINITE, a nul
one as IMMEDIATE, and a positive one as an upper bound timeout (like most if
not all of the underlying system calls...).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790488 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Don't try to access proc_pthread_mutex_t's condvar if the mutex was _put[_ex]()
and not _create()d, this is a real pthread_mutex_t.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790446 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
No functional change, more helpers/macros to help identify struct
proc_pthread_mutex_t members.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790444 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
unix/misc.c is not needed anymore since we use apr_proc_mutex_trylock()
directly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790439 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When no native timedlock is available, fall back to a common/generic spin sleep
proc_mutex_spinsleep_timedacquire() based on the configured APR_USE_*_SERIALIZE
trylock.
Otherwise, choose the best timedlock mechanism in the following order:
1. PTHREAD if HAVE_PTHREAD_MUTEX_ROBUST && (HAVE_PTHREAD_MUTEX_TIMEDLOCK
|| HAVE_PTHREAD_CONDATTR_SETPSHARED)
2. SYSV if HAVE_SEMTIMEDOP
3. POSIX if HAVE_SEM_TIMEDWAIT
4. The one of APR_USE_*_SERIALIZE, hence possibly non-robust and/or spinning
with the same robustness as the underlying apr_proc_mutex_trylock() call.
apr_proc_mutex_timedlock() won't return ENOTIMPL anymore.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790436 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790331 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
implementation based on pthread_cond_timedwait() when possible.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790330 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790304 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790303 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
rr1790301
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790302 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
then absolute.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790296 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790157 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
call us, we could have blown past it... in that case, just
try the lock
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790111 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
osx/macos that don't have it. Be a bit more generous in the test
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1790107 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1789998 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
the second/double proc_ (consistently with other mechanisms).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1775069 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
As noticed by rjung, not all pthread implementations have mutex_timedlock(),
like Solaris 8, so proc_mutex_proc_pthread_timedacquire() can return
APR_ENOTIMPL.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1774973 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1761279 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
locks\win32\proc_mutex.c(252): error C2065: 'mutex' : undeclared identifier
Submitted by: Ivan Zhakov <ivan visualsvn.com>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1755954 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
variable name.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1742215 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
types constructors/_put()ers and non-unix mutex mechanisms, always
destroy the underlying native mutex when apr_proc_mutex_destroy() is
called explicitly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1738926 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
mutex should or not be cleaned up (destroyed) with the constructed
APR mutex (given pool), and default to not for the simple _put()
function.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1738925 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Restore mmap-ed fd close stripped by above commit.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1738791 13f79535-47bb-0310-9956-ffa450edef68
|