summaryrefslogtreecommitdiff
path: root/include/asterisk/lock.h
AgeCommit message (Collapse)Author
2006-11-02Set the AST_RWLOCK_INIT_VALUE to the PTHREAD_RWLOCK_INIT_VALUE if it is ↵Joshua Colp
available, that way outside stuff can determine whether to use a constructor or deconstructor for initialization instead of using the init value. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46940 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-02I'm crazy so I will add this... pthread rwlock wrappers, along with autoconf ↵Joshua Colp
stuff that detects the presence of the initializer and the ability to set the kind of lock (in our case we rather like writer preferred locks so writer starvation doesn't occur... but on something like Darwin we don't get that) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-30Issue 8246 Doxygen updates (kshumard) Olle Johansson
THANK YOU! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46434 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-28Merged revisions 43952 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r43952 | kpfleming | 2006-09-28 17:42:18 -0500 (Thu, 28 Sep 2006) | 2 lines eliminate compiler warning when DEBUG_CHANNEL_LOCKS is enabled and users of this header file don't also include channel.h ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18don't need two copies of thisKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18a little cleanup and simplification, and remove ON_FIRST_USE mode since ↵Kevin P. Fleming
nobody uses it git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21merge new_loader_completion branch, including (at least):Kevin P. Fleming
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-17Use OSAtomicAdd instead of OSAtomicDecrement to decrement the value by 1.Joshua Colp
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30fix the condition for including the header for osx atomicsRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36421 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-30add support for atomic operations provided by mac osxRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36409 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-13use atomic operations provided by the compiler if they are available (yay ↵Kevin P. Fleming
for gcc 4.1 users!) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-11suppress warnings when building with DEBUG_CHANNEL_LOCKS (issue #7330, casper)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-23restore AST_LIST_HEAD_INIT (with no users in the tree right now)Kevin P. Fleming
update ast_mutex_init to allow mutexes that are all zero bytes to be initialized (in the case of a dynamically-allocated structure containing a mutex) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-11set correct type for lock initializersLuigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16- Fixes to ast_channel_lock functionsOlle Johansson
- New get_sip_pvt_byid function (not really used correctly yet...) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15More ast_channel_lock fixesOlle Johansson
- Update lock.h with definitions of ast_channel_lock, ast_channel_unlock and ast_channel_trylock - Convert some functions (but not all) in channel.c - Fix some bugs in chan_sip.c - Convert rest of chan_sip.c git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20295 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-15New functions for locking a channel - these simplify debuggingOlle Johansson
when you have channel locking issues. (Part of the SIP transfer patch, where I had a *lot* of channel locking problems) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14temporarily revert the way mutex are initialized on BSD systems.Luigi Rizzo
This fixes the compilation on OS/X (the change exposed a wrong assumption on mutex types on OS/X), but still leaves open the bugs in initializing mutex on bsd systems, which you will see reported as 'locking failures' on certain operations. I need to investigate the issue further, but the best thing i can do now is leave things as they have been for months. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19973 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12simplify macro usageKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19614 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-12add 'show threads' and 'show profile' commands.Luigi Rizzo
These are momstly debugging tools for developers, a bit documented in the header files (utils.h), although more documentation is definitely necessary. The performance impact is close to zero(*) so there is no need to compile it conditionally. (*) not completely true - thread destruction still needs to search a list _but_ this can be easily optimized if we end up with hundreds of active threads (in which case, though, the problem is clearly elsewhere). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11fix various bugs in the DEBUG_THREADS code including:Luigi Rizzo
- misspelled ast_mutex_logger() instead of __ast_mutex_logger() - misplaced #define ast_mutex_init(pmutex) - wrong arguments to __ast_mutex_logger() in one instance. Clearly this code is too spaghetti! git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19396 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31- Change AST_INLINE_AP to AST_INLINE_API for non-386 systems :-)Olle Johansson
- Doxygen changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16615 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30initial implementation of support for native atomic ops.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16601 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30Doxygen doc updatesOlle Johansson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30remove AST_MUTEX_DEFINE_EXPORTED, which now has no more clients.Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16533 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30document why there are so many versions of the mutex functions,Luigi Rizzo
with their pros and cons, and that we should converge to a single method. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-24don't treat timeouts as errors in ast_cond_timedwaitKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14593 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-12fix a little typoRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29remove extraneous svn:executable propertiesKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-11issue #5668, modified to compile on non-Cygwin platforms :-)Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-08issue #5570Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-01issue #4678Kevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-28fix non-DEBUG_THREADS builds with new cond wrappers and lock header ↵Kevin P. Fleming
reorganization git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-28add 'ast_cond_t' type for pthread condition variables, and appropriate API ↵Kevin P. Fleming
wrappers git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24Doxygen documentation update from oej (issue #5505)Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-09Make lock logging reentrant when DEBUG_THREADS enabledMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-01eliminate spurious warningsKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6478 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-31make DEBUG_THREADS have more visible loggingKevin P. Fleming
make DEBUG_THREADS able to catch locks being unlocked by threads that did not own them add proper wrappers for pthread_cond_wait() and pthread_cond_timedwait() for DEBUG_THREADS mode git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6464 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-30major header file cleanup: license, copyrights, descriptions, markers, etc.Kevin P. Fleming
remove deprecated config_old.c/config_old.h remove unused cvsid.h git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6454 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-08-09eliminate compiler warnings when DEBUG_THREADS is enabledKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-07-26correct commentKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-23Fix debugging to not print warningsMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5981 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-02-08Minor deadlock detect fix (bug #3531)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4986 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-01-21update copyright headers for 2005Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4868 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-12-14Merge slimey's Solaris compatibility (with small mods) (bug #2740)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-20Fix initialization tiddly bitMark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4039 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-20Fix typo and missing format string in a fprintf in lock.hJames Golovich
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4038 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-17Thread fixes, vm fix (bug #2665)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-10-06Locking updates for debug mode, fix SIP MWI (bug #2582)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3918 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2004-08-08Merge BSD stack size work (bug #2067)Mark Spencer
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3596 65c4cc65-6c06-0410-ace0-fbb531ad65f3