| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
casts.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@125073 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124775 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124774 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
| |
LibC SDK
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@106767 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Tipped-of-by: Uwe Zeisberger
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
platforms without flock.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65200 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
strcmp calls.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65191 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
fd on mmap failure.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65188 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
_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
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64950 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64920 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64919 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://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: http://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pthread_rwlock_t can't be used; print and cache results of tests
carried out; define HAVE_PTHREAD_RWLOCKS when rwlocks can be used.
* locks/unix/thread_rwlock.c, include/arch/unix/apr_arch_thread_rwlock.h:
Use new HAVE_PTHREAD_RWLOCKS define.
PR: 22990
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64882 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
undefined results in a POSIX implementation.
* locks/unix/thread_cond.c (apr_thread_cond_create): Don't run cleanup
if pthread_cond_init fails since that gives undefined results.
(apr_thread_cond_destroy): Use apr_pool_cleanup_run so the cleanup is
always unregistered.
* test/testlock.c (test_cond): Test apr_thread_cond_destroy and use
apr_assert_success() a little more.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64848 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
object in struct apr_thread_cond_t rather than a pointer to one.
* locks/unix/thread_cond.c (apr_thread_cond_create): Adjust use of
->cond, remove ENOMEM handling. (apr_thread_cond_wait,
apr_thread_cond_timedwait, apr_thread_cond_signal,
apr_thread_cond_broadcast): Adjust use of ->cond.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64847 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64749 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64747 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64746 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
object in struct apr_thread_rwlock_t rather than a pointer to one.
* locks/unix/thread_rwlock.c (apr_thread_rwlock_create): Adjust use of
->rwlock, simplify to a single palloc call, and remove ENOMEM handling.
(apr_thread_rwlock_rdlock, apr_thread_rwlock_tryrdlock,
apr_thread_rwlock_wrlock, apr_thread_rwlock_trywrlock,
apr_thread_rwlock_unlock): Adjust use of ->rwlock appropriately.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64681 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to use apr_pool_cleanup_run.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64680 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rwlock must be initialized but not locked by any thread. Accordingly,
remove code which POSIX says gives undefined results:
* locks/unix/thread_rwlock.c (thread_rwlock_cleanup): Don't unlock an
unlocked lock. (apr_thread_rwlock_create): Don't destroy an
uninitialized lock if _init fails. (apr_thread_rwlock_destroy): If
cleanup fails, the lock must be in a bad state, so don't run cleanup
again.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64679 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Fixes build breakage.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64581 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
as reentrant as possible. Switched to atomics to preserve the
incr/decr integrity.
Although we previously reset the thread_id to zero, it's been
pointed out on list that this is less than desireable. However,
negative one isn't necessarily a good choice because several
platforms have unsigned thread_t's.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64579 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
for all unimplemented trylock vectors. Prevents us from simply
segfaulting when a given proc_mutex style does not support trylock.
No Apache HTTP Server code attempted an apr_proc_mutex_trylock, but
this could affect other platforms, and was inconsistent with the
implementations of other mutex methods and other platform implementations.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64578 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
lock, then mark locked; instead mark as unlock (while the lock is
still held) and then unlock.
Serious change, this will mean that an unlock 'failure' will still
set the unlocked flag. This is consistent with the fact that the
lock probably is not held or valid anymore, and certainly shouldn't
be re-unlocked when destroyed.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64577 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Note that the result from WaitFor{*}() calls is a rather
special case, since it has other interesting details. These
were not touched since they are clearer as-is.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64542 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
| |
Submitted by: Marc Adkins
Reviewed by: Bill Stoddard
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64541 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
pthread_mutex_destroy(NULL) if pthread_mutex_init() fails.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64534 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
don't check for allocation failure.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64533 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
pthread_mutex_init() is equivalent to passing NULL: simplify
apr_thread_mutex_create() to do the latter.
Fixes build on BSD/OS 4.0, which prototypes but does not implement
pthread_mutexattr_{init,destroy}, fooling the autoconf checks.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64532 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: http://svn.apache.org/repos/asf/apr/apr/trunk@64531 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
| |
apr_proc_mutex_child_init() or apr_global_mutex_child_init().
This allows child init to work when the lock file was a temp
file created by APR. (The problem only occurred with flock-
based mutexes.)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64530 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
don't let the file be deleted on close. For flock-based mutexes,
this corrects a fatal problem, since the file would disappear
when a program was spawned and cleanup-for-exec was performed,
and a subsequent attempt to perform child process mutex
initialization would fail. For fcntl-based mutexes, this was a
very minor issue that resulted in a failing unlink() when the
file was closed, since fcntl lock initialization always removes
the file immediately.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64529 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
and fcntl mutex creation.
PR: 19036
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64488 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
is not a noop for some mutexes
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64456 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64453 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
process, and we are using anonymous proc_mutex or global_mutex methods,
so win32 should return APR_SUCCESS for proc_mutex_child_init.
We also introduced the kernel 'object'
folding function for shared memory
section names, so reuse that folding function here to provide reliable
Win2K/XP names (prefixed with \global\) and fold away any slashes or
backslashes from that path.
Based on issues observed by "Andre Schild" <A.Schild@aarboard.ch> with
the httpd mod_ssl implementation for Win32, with input from Andre and
JimJ.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64452 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
Ohtani Hiroki <ohtani@ariel-networks.com> that we failed to relock
on failure, and the second problem I found that we weren't returning
an error status when we failed for something other than timeup.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64389 13f79535-47bb-0310-9956-ffa450edef68
|