| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
count
assures that one thread won't steal wakeups from other threads in the queue.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@555730 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: https://svn.apache.org/repos/asf/apr/apr/trunk@551965 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: https://svn.apache.org/repos/asf/apr/apr/trunk@543333 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
|
|
|
|
|
|
|
|
|
|
| |
Originally titled: [patch 10/17] include path prefix win32/
Submitted by: John Mark Vandenberg
Reviewed by: Will Rowe (concept), Justin Erenkrantz
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@421349 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
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: https://svn.apache.org/repos/asf/apr/apr/trunk@386780 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: https://svn.apache.org/repos/asf/apr/apr/trunk@371172 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
returning APR_EBUSY.
Submitted by: Ronen Mizrahi <ronen tversity.com>
Reviewed by: wrowe, Henry Jen
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@290766 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
| |
PR: 27654, 34336
Submitted by: Henry Jen <henryjen ztune.net> and E Holyat <eholyat yahoo.com>
Reviewed by: wrowe, stoddard
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@224407 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@124775 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@124774 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 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: https://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: https://svn.apache.org/repos/asf/apr/apr/trunk@64541 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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: https://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: https://svn.apache.org/repos/asf/apr/apr/trunk@64389 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
|
|
|
|
|
|
|
|
|
| |
else should look at this code, please, and let me know if it follows
the correct behavior. It passes the tests, but that presumes the tests
themselves are sufficient.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64243 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fail a single WaitForSingleObject(..., INFINITE) (yes, it can happen) and
properly unwind the *correct* error when we fail the nested Wait.
Also clean up the usage where rv is an apr result, and res in an NT result
to conform a bit better with other code.
Finally implements thread_cond_wait_with_timeout.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64238 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63746 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63672 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
field in the lock was uninitialized.
Submitted by: INOUE Seiichiro <inoue@ariel-networks.com>
Reviewed by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63107 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
not a failure condition when calling WaitForSingleObject on a mutex.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63071 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63068 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
Same commit needed for Netware - though I don't that build structure.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63051 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
to apr_proc_lock as a Windows MUTEX locks threads as well as processes.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63026 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@62994 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
|
| |
have a value. Of course, fname may be NULL, in which case this patch
from 1.46 broke any NULL locking. Correct the Local/Global fix for NULL
lock names.
Oh most excelent RM of .31, please consider this patch, without which
mod_rewrite will not load.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62890 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
| |
introduce proc_mutex for Win32.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62714 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
|
|
|
|
|
|
|
|
| |
Need to include misc.h to prevent undefined variable errors for apr_os_level
and APR_WIN_2000.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62564 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
|
|
|
|
|
|
|
| |
<mturk@mappingsoft.com>. This is the cleaner of the two parts of his
patch, which does _not_ change the initial locking state of the mutex,
nor add a private owner flag. Those changes were invalid because no
part of apr should rely on intimate knowledge of the internals of other
parts of apr, whenever we can avoid it.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62563 13f79535-47bb-0310-9956-ffa450edef68
|
|
|
|
| |
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62561 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|