| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1797297 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
apr_os_proc_mutex_get_ex|_put_ex, but fall back to the supported
APR_LOCK_DEFAULT
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1797267 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
r1671292, r1732582 from trunk), was;
locks: introduce apr_{thread,proc,global}_mutex_timedlock().
(and many many more commit log entries, see r1733684 for details)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1796072 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locks: follow up to r1667900.
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/branches/1.6.x@1795940 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locks: follow up to r1790488.
Make it clear in the type that it's a relative/interval time.
locks: follow up to r1790488 and r1790521: likewise for the
apr_proc_mutex_unix_lock_methods_t's timedacquired method.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1795939 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_{thread,proc,global}_timedlock() with negative timeout is now equivalent
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/branches/1.6.x@1795937 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_{thread,proc,global}_timedlock() with negative timeout is now equivalent
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/branches/1.6.x@1790633 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locks: follow up to r1790488.
Make it clear in the type that it's a relative/interval time.
locks: follow up to r1790488 and r1790521: likewise for the
apr_proc_mutex_unix_lock_methods_t's timedacquired method.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1790527 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
locks: follow up to r1667900.
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/branches/1.6.x@1790490 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_os_proc_mutex_put_ex: Allow to specify whether the OS native
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/branches/1.6.x@1738927 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_proc/global_mutex: Fix API regarding the native OS mutexes
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...).
proc_mutex-unix: follow up to r1733775.
Restore mmap-ed fd close stripped by above commit.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1738806 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r1732582 from trunk:
OS/2: Add an implementation of condition variables, derived from the Win32
implementation.
locks: introduce apr_{thread,proc,global}_mutex_timedlock().
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.
Follow up to r1667900: revert spurious change on test/abts_tests.h.
Follow up to r1667900: fix comments.
Follow up to r1667900: handle negative (infinite) timeout in mutex/cond timedlock/timedwait.
locks: follow up to r1667900.
In apr_global_mutex_timedlock(), we can avoid converting from relative to
absolute time if thread locking is not needed.
make internal function static to avoid a warning
Follow up to r1667900: Avoid a circular reference (PR 59068).
Submitted by: bjh, ylavic, ylavic, ylavic, ylavic, ylavic, trawick, ylavic
Reviewed/backported by: ylavic
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1733684 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Add object perms set macros and implement them for shm and mutex
Submitted by: mturk, rpluem
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.6.x@1590617 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1533107 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
it should really handle src==NULL
Reviewed/backported by: jim
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1533105 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.5.x@1071966 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
|
|
|
|
|
|
|
| |
Tipped-of-by: Uwe Zeisberger
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
upon Python at packaging time, but not at end-user config/build time. As far
as I can tell, the build continues to function properly. (out-of-dir
config/make not tested, and apr-iconv prolly needs some work)
The buildconf scripts now generate a build-outputs.mk file which is included
by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk
specifies all of the various files present in the distribution.
The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather
than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports.
The corresponding delete-* targets were eliminated since we have a precise
set of inputs.
The subdirs' Makefiles were removed since they are no longer called/used.
The apr-util/uri Makefile was responsible for compiling a C program to
generate the uri_delims.h file. That process was replaced by a Python script
to generate the header (called by buildconf). The .c and .dsp were left for
the Windows build to continue, but that should be revamped.
build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of
cleanup is still needed. Much of the recursive/local/x- logic is no longer
needed and can be elimianated. rules.mk was created for inclusion by N
makefiles, but that isn't really true any more, so it could probably be
tossed (caveat: test/Makefile). Saved for a phase 2.
Some additional work was added to properly clean up files in */build/,
rather than relying on a makefile in there.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
associated with a mutex.
This is used in Apache to simplify the effort of getting permissions
set properly on mutexes that will be created as root but used
as non-root. For flock-based mutexes, chown() needs to be performed
on the mutex file.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64531 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64275 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
aix/dso.h -> -> aix/apr_arch_dso.h
beos/dso.h -> beos/apr_arch_dso.h
beos/proc_mutex.h -> beos/apr_arch_proc_mutex.h
beos/thread_cond.h -> beos/apr_arch_thread_cond.h
beos/thread_mutex.h -> beos/apr_arch_thread_mutex.h
beos/threadproc.h -> beos/apr_arch_threadproc.h
beos/thread_rwlock.h -> beos/apr_arch_thread_rwlock.h
netware/dso.h -> -> netware/apr_arch_dso.h
netware/fileio.h -> -> netware/apr_arch_fileio.h
netware/global_mutex.h -> netware/apr_arch_global_mutex.h
netware/internal_time.h -> netware/apr_arch_internal_time.h
netware/networkio.h -> netware/apr_arch_networkio.h
netware/pre_nw.h -> netware/apr_arch_pre_nw.h
netware/proc_mutex.h -> netware/apr_arch_proc_mutex.h
netware/thread_cond.h -> netware/apr_arch_thread_cond.h
netware/thread_mutex.h -> netware/apr_arch_thread_mutex.h
netware/threadproc.h -> netware/apr_arch_threadproc.h
netware/thread_rwlock.h -> netware/apr_arch_thread_rwlock.h
os2/dso.h -> os2/apr_arch_dso.h
os2/fileio.h -> os2/apr_arch_fileio.h
os2/networkio.h -> os2/apr_arch_networkio.h
os2/os2calls.h -> os2/apr_arch_os2calls.h
os2/proc_mutex.h -> os2/apr_arch_proc_mutex.h
os2/thread_cond.h -> os2/apr_arch_thread_cond.h
os2/thread_mutex.h -> os2/apr_arch_thread_mutex.h
os2/threadproc.h -> os2/apr_arch_threadproc.h
os2/thread_rwlock.h -> os2/apr_arch_thread_rwlock.h
os390/dso.h -> os390/apr_arch_dso.h
unix/dso.h -> unix/apr_arch_dso.h
unix/fileio.h -> unix/apr_arch_fileio.h
unix/global_mutex.h -> unix/apr_arch_global_mutex.h
unix/inherit.h -> unix/apr_arch_inherit.h
unix/internal_time.h -> unix/apr_arch_internal_time.h
unix/misc.h -> unix/apr_arch_misc.h
unix/networkio.h -> unix/apr_arch_networkio.h
unix/proc_mutex.h -> unix/apr_arch_proc_mutex.h
unix/shm.h -> unix/apr_arch_shm.h
unix/thread_cond.h -> unix/apr_arch_thread_cond.h
unix/thread_mutex.h -> unix/apr_arch_thread_mutex.h
unix/threadproc.h -> unix/apr_arch_threadproc.h
unix/thread_rwlock.h -> unix/apr_arch_thread_rwlock.h
win32/atime.h -> win32/apr_arch_atime.h
win32/dso.h -> win32/apr_arch_dso.h
win32/fileio.h -> win32/apr_arch_fileio.h
win32/inherit.h -> win32/apr_arch_inherit.h
win32/misc.h -> win32/apr_arch_misc.h
win32/networkio.h -> win32/apr_arch_networkio.h
win32/proc_mutex.h -> win32/apr_arch_proc_mutex.h
win32/thread_cond.h -> win32/apr_arch_thread_cond.h
win32/thread_mutex.h -> win32/apr_arch_thread_mutex.h
win32/threadproc.h -> win32/apr_arch_threadproc.h
win32/thread_rwlock.h -> win32/apr_arch_thread_rwlock.h
win32/utf8.h -> win32/apr_arch_utf8.h
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64271 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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64060 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
apr_proc_mutex_defname which returns the type name of the mutex
(eg: "sysvsem") as well as the default mutex type (APR_LOCK_DEFAULT).
Mostly useful under Unix were the locktypes are selectable.
apr_proc_mutex_name takes a *apr_proc_mutex_t argument, whereas
apr_proc_mutex_defname takes (and requires) none. For those systems
that don't have selectable mutex types, I've "thought up" names
that made sense... feel free to modify :)
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63470 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which guarentees unnested lock behavior, keep APR_THREAD_MUTEX_DEFAULT
on Win32, Netware and OS2 as nested locks, leave Unix and BeOS with
unnested locks by default.
Needs an implementation on Netware and OS2 for UNNESTED locks, for now
return APR_ENOTIMPL.
Required for absolute locks in series for Win32 on the same thread,
since CriticalSection objects are blindingly fast without contention,
but they will always nest on the same thread.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63440 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
(somehow CVS ignored updating these on the last commit.)
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63287 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
srcdir to always be available in a Makefile, so we need to stop adding
this only when we use VPATH.
Change the dependency generation to use .deps instead of appending to
the Makefile. This makes us consistent with the dependency style of
httpd-2.0.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63286 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63235 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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
proc mutex.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63059 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AIX xlc really got upset, though I didn't unravel the macro
to see what the fuss was about
> "global_mutex.c", line 177.42: 1506-137 (E) Declaration
> must declare at least one declarator, tag, or the members
> of an enumeration.
I changed the other new invocations to match the normal
pattern.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63024 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
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62942 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
and get rid of apr_lock_create_np(); apr_lock_create() has a new
parameter for specifying the lock mechanism (or APR_LOCK_DEFAULT to let
APR choose)
(same for apr_proc_mutex_create_np() and apr_proc_mutex_create())
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62684 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
lock is still undecided.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62683 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
apr_os_lock_get/set, but they work for apr_proc_mutex_t types instead.
I did my best to implement these on non-Unix platforms from how I saw
them implemented for apr_os_lock_get/set, but on those platforms they
are untested.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62447 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62436 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
default not nested, but an init flag can enable them. I added a new test
to testlockperf to show how much faster non-nested mutexes are. I also
updated calls to apr_thread_mutex_init() wherever I could find them.
This patch only implements this for Unix (nested locks already existed
on Unix, so this patch just optionally enables/disables them). I did my
best to change the function declaration on other platforms, but someone
will have to double check me. Those other platforms will also have to
either enable nested locks (sometimes available in their thread
library) or just do what Unix does.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62435 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Implements it for UNIX, stubs elsewhere.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62419 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62385 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62384 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62383 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62377 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
apr_proc_mutex_create_np()
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62375 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Submitted by: Aaron Bannert <aaron@clove.org>
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62347 13f79535-47bb-0310-9956-ffa450edef68
|