mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-30 18:40:46 +00:00
Fix 1.4 build when LOW_MEMORY is enabled.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@114051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -141,18 +141,31 @@ enum ast_lock_type {
|
|||||||
* lock info struct. The lock is marked as pending as the thread is waiting
|
* lock info struct. The lock is marked as pending as the thread is waiting
|
||||||
* on the lock. ast_mark_lock_acquired() will mark it as held by this thread.
|
* on the lock. ast_mark_lock_acquired() will mark it as held by this thread.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(LOW_MEMORY)
|
||||||
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
void ast_store_lock_info(enum ast_lock_type type, const char *filename,
|
||||||
int line_num, const char *func, const char *lock_name, void *lock_addr);
|
int line_num, const char *func, const char *lock_name, void *lock_addr);
|
||||||
|
#else
|
||||||
|
#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Mark the last lock as acquired
|
* \brief Mark the last lock as acquired
|
||||||
*/
|
*/
|
||||||
|
#if !defined(LOW_MEMORY)
|
||||||
void ast_mark_lock_acquired(void *lock_addr);
|
void ast_mark_lock_acquired(void *lock_addr);
|
||||||
|
#else
|
||||||
|
#define ast_mark_lock_acquired(ignore)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Mark the last lock as failed (trylock)
|
* \brief Mark the last lock as failed (trylock)
|
||||||
*/
|
*/
|
||||||
|
#if !defined(LOW_MEMORY)
|
||||||
void ast_mark_lock_failed(void *lock_addr);
|
void ast_mark_lock_failed(void *lock_addr);
|
||||||
|
#else
|
||||||
|
#define ast_mark_lock_failed(ignore)
|
||||||
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief remove lock info for the current thread
|
* \brief remove lock info for the current thread
|
||||||
@@ -160,7 +173,11 @@ void ast_mark_lock_failed(void *lock_addr);
|
|||||||
* this gets called by ast_mutex_unlock so that information on the lock can
|
* this gets called by ast_mutex_unlock so that information on the lock can
|
||||||
* be removed from the current thread's lock info struct.
|
* be removed from the current thread's lock info struct.
|
||||||
*/
|
*/
|
||||||
|
#if !defined(LOW_MEMORY)
|
||||||
void ast_remove_lock_info(void *lock_addr);
|
void ast_remove_lock_info(void *lock_addr);
|
||||||
|
#else
|
||||||
|
#define ast_remove_lock_info(ignore)
|
||||||
|
#endif
|
||||||
|
|
||||||
static void __attribute__((constructor)) init_empty_mutex(void)
|
static void __attribute__((constructor)) init_empty_mutex(void)
|
||||||
{
|
{
|
||||||
|
@@ -1354,7 +1354,9 @@ int ast_utils_init(void)
|
|||||||
{
|
{
|
||||||
base64_init();
|
base64_init();
|
||||||
#ifdef DEBUG_THREADS
|
#ifdef DEBUG_THREADS
|
||||||
|
#if !defined(LOW_MEMORY)
|
||||||
ast_cli_register_multiple(utils_cli, sizeof(utils_cli) / sizeof(utils_cli[0]));
|
ast_cli_register_multiple(utils_cli, sizeof(utils_cli) / sizeof(utils_cli[0]));
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user