| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1905407 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accessors from/to available APR mechanisms, adding the new functions
apr_os_proc_mutex_get_ex() and apr_os_proc_mutex_set_ex() which give
control to the user over the selected mechanisms, including the missing
POSIX semaphores (sem_t) on platforms supporting them.
For POSIX sems, this moves the "sem_t *psem_interproc;" member from struct
apr_proc_mutex_t to apr_os_proc_mutex_t (now complete) so that we can avoid
members duplication between the two structs, and hence replace all the doublons
in apr_os_proc_mutex_t with an apr_os_proc_mutex_t member, called "os", to be
used for runtime.
This first commit aims to be backportable to 1.6.x, thus does not address the
Netware case which requires an incompatible change of the apr_proc_mutex_t to
a pointer type (the implementation is here since very similar to other changes
is this commit, but it is commented out for now, a simple follow up is coming
with the type change for trunk only...).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1733775 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667903 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For proc mutexes, the new mechanism APR_LOCK_DEFAULT_TIMED usable at creation time
allows for the best mechanism to be elected (unixes: 1 to 3, or specific: 4 to 7):
1. PROC_PTHREAD if pthread_mutex_timedlock() and pthread_mutex_set_robust_np()
are both available,
2. SYSV if semtimedop() is availale,
3. POSIXSEM if sem_timedwait() is available,
4. BeOS' acquire_sem_etc() if available,
5. NetWare falls back to apr_thread_mutex_timedlock() as for others functions,
6. OS2's DosRequestMutexSem(),
7. Windows' WaitForSingleObject().
Otherwise (like when fcntl and flock only are availble, if that's ever possible),
APR_ENOTIMPL is returned.
For thread mutexes, the new flag APR_THREAD_MUTEX_TIMED, usable at create()
time still, allows to switch to an implementation using a condition variable
and apr_thread_cond_timedwait() when if no native mechanism is available (eg.
NetWare, pthreads but without pthread_mutex_timedlock() available).
On windows, this initializes a WaitForSingleObject()able handle (Mutex) instead
of the fastest (but not timeout-able) CRITICAL_SECTION used by default.
All apr_{thread,proc,global}_mutex_timedlock() functions can take a relative or
absolute time, thanks to the last (boolean) argument.
Test suite updated accordingly.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1667900 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
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: https://svn.apache.org/repos/asf/apr/apr/trunk@884139 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
apr_proc_mutex_lockfile()
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@882915 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@741862 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
between extern "C" blocks and doxygen blocks, that we never include
other headers within our own header's extern "C" block, that we always
tag the entire file contents for doxygen (within the APR_HEADER_H
only-once block), and generally clean up doxygen so that it is all
consistent and generates respectable (although not yet 'great') results.
Major TODO after 0.9.2 releases; fill in the apr.h APR_HAVE/APR_HAS
and apr_type_t documentation!!!
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64397 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
No functional changes
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
No code changes.
(Note removal of #define duplication in apr_poll.h/apr_network_io.h of the
APR_POLL* values. This appears to have been an oversight and is now just
in apr_poll.h)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64009 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
Resolve some circular includes (apr_thread_mutex.h needs apr_pools.h needs
apr_allocator.h needs apr_thread_mutex.h ...).
Remove all apr_lock.h related files (incl. arch-specific headers and
implementations).
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63234 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
named semaphores (sem_open). Because there are a few different
implementations around, this uses the lowest common denominator in
creating the semaphore name. As far as its location in DEFAULT
priority, it's placed between pthread and sysvsem. Tested on
Darwin (in which it's the new default) and Solaris.
As part of the discovery of sem_open under Solaris, APR is now
aware of shm_open (Posix shared memory) under Solaris as well, if
someone wants to monkey with that :)
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63222 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63146 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63065 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
relationship - allow Win32/Netware [and perhaps, some unix-ish platforms
that don't have a 'proc lock not typesafe' construct] to 'borrow' the
proc_mutex code. Because the apr_thread_lock_create call differs so
significantly, global locks can never be implemented in terms of thread
locks [as well as the converse.]
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63050 13f79535-47bb-0310-9956-ffa450edef68
|
|
This is analog to the APR_LOCKALL method of apr_lock_t, and provides
cross-process AND cross-thread mutual exclusion.
I have provided a simple test (based on testprocmutex.c) and stubs
for non-Unix platforms.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63001 13f79535-47bb-0310-9956-ffa450edef68
|