summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asterisk.h10
-rw-r--r--include/asterisk/inline_api.h6
-rw-r--r--include/asterisk/lock.h32
-rw-r--r--include/asterisk/utils.h11
4 files changed, 8 insertions, 51 deletions
diff --git a/include/asterisk.h b/include/asterisk.h
index 93c7cfb28..f5ed09167 100644
--- a/include/asterisk.h
+++ b/include/asterisk.h
@@ -152,7 +152,6 @@ int ast_shutting_down(void);
*/
int ast_shutdown_final(void);
-#if !defined(LOW_MEMORY)
/*!
* \brief Register the version of a source code file with the core.
* \param file the source file name
@@ -225,11 +224,7 @@ char *ast_complete_source_filename(const char *partial, int n);
__ast_unregister_file(__FILE__); \
}
#endif /* !MTX_PROFILE */
-#else /* LOW_MEMORY */
-#define ASTERISK_REGISTER_FILE()
-#endif /* LOW_MEMORY */
-#if !defined(LOW_MEMORY)
/*!
* \brief support for event profiling
*
@@ -248,11 +243,6 @@ char *ast_complete_source_filename(const char *partial, int n);
int ast_add_profile(const char *, uint64_t scale);
int64_t ast_profile(int, int64_t);
int64_t ast_mark(int, int start1_stop0);
-#else /* LOW_MEMORY */
-#define ast_add_profile(a, b) 0
-#define ast_profile(a, b) do { } while (0)
-#define ast_mark(a, b) do { } while (0)
-#endif /* LOW_MEMORY */
/*! \brief
* Definition of various structures that many asterisk files need,
diff --git a/include/asterisk/inline_api.h b/include/asterisk/inline_api.h
index 291a83828..5f7a43bdc 100644
--- a/include/asterisk/inline_api.h
+++ b/include/asterisk/inline_api.h
@@ -33,7 +33,7 @@
copies of the function body are not built in different modules.
However, since this doesn't work for clang, we go with 'static'
anyway and hope for the best!
- - when LOW_MEMORY is defined, inlining should be disabled
+ - when DISABLE_INLINE is defined, inlining should be disabled
completely, even if the compiler is configured to support it
The AST_INLINE_API macro allows this to happen automatically, when
@@ -45,7 +45,7 @@
including the header file
*/
-#if !defined(LOW_MEMORY) && !defined(DISABLE_INLINE)
+#if !defined(DISABLE_INLINE)
#if !defined(AST_API_MODULE)
#if defined(__clang__) || defined(__GNUC_STDC_INLINE__)
@@ -57,7 +57,7 @@
#define AST_INLINE_API(hdr, body) hdr; hdr body
#endif
-#else /* defined(LOW_MEMORY) */
+#else /* defined(DISABLE_INLINE) */
#if !defined(AST_API_MODULE)
#define AST_INLINE_API(hdr, body) hdr;
diff --git a/include/asterisk/lock.h b/include/asterisk/lock.h
index 652ca136e..5b6817f6b 100644
--- a/include/asterisk/lock.h
+++ b/include/asterisk/lock.h
@@ -240,7 +240,6 @@ enum ast_lock_type {
* 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.
*/
-#if !defined(LOW_MEMORY)
#ifdef HAVE_BKTR
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, struct ast_bt *bt);
@@ -249,32 +248,15 @@ 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);
#endif /* HAVE_BKTR */
-#else
-
-#ifdef HAVE_BKTR
-#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS,BUD)
-#else
-#define ast_store_lock_info(I,DONT,CARE,ABOUT,THE,PARAMETERS)
-#endif /* HAVE_BKTR */
-#endif /* !defined(LOW_MEMORY) */
-
/*!
* \brief Mark the last lock as acquired
*/
-#if !defined(LOW_MEMORY)
void ast_mark_lock_acquired(void *lock_addr);
-#else
-#define ast_mark_lock_acquired(ignore)
-#endif
/*!
* \brief Mark the last lock as failed (trylock)
*/
-#if !defined(LOW_MEMORY)
void ast_mark_lock_failed(void *lock_addr);
-#else
-#define ast_mark_lock_failed(ignore)
-#endif
/*!
* \brief remove lock info for the current thread
@@ -282,7 +264,6 @@ void ast_mark_lock_failed(void *lock_addr);
* this gets called by ast_mutex_unlock so that information on the lock can
* be removed from the current thread's lock info struct.
*/
-#if !defined(LOW_MEMORY)
#ifdef HAVE_BKTR
void ast_remove_lock_info(void *lock_addr, struct ast_bt *bt);
#else
@@ -290,15 +271,6 @@ void ast_remove_lock_info(void *lock_addr);
#endif /* HAVE_BKTR */
void ast_suspend_lock_info(void *lock_addr);
void ast_restore_lock_info(void *lock_addr);
-#else
-#ifdef HAVE_BKTR
-#define ast_remove_lock_info(ignore,me)
-#else
-#define ast_remove_lock_info(ignore)
-#endif /* HAVE_BKTR */
-#define ast_suspend_lock_info(ignore);
-#define ast_restore_lock_info(ignore);
-#endif /* !defined(LOW_MEMORY) */
/*!
* \brief log info for the current lock with ast_log().
@@ -333,11 +305,7 @@ struct ast_str *ast_dump_locks(void);
* this gets called during deadlock avoidance, so that the information may
* be preserved as to what location originally acquired the lock.
*/
-#if !defined(LOW_MEMORY)
int ast_find_lock_info(void *lock_addr, char *filename, size_t filename_size, int *lineno, char *func, size_t func_size, char *mutex_name, size_t mutex_name_size);
-#else
-#define ast_find_lock_info(a,b,c,d,e,f,g,h) -1
-#endif
/*!
* \brief Unlock a lock briefly
diff --git a/include/asterisk/utils.h b/include/asterisk/utils.h
index 9789d34ee..f9608f517 100644
--- a/include/asterisk/utils.h
+++ b/include/asterisk/utils.h
@@ -423,13 +423,12 @@ int ast_careful_fwrite(FILE *f, int fd, const char *s, size_t len, int timeoutms
* Thread management support (should be moved to lock.h or a different header)
*/
-#define AST_STACKSIZE (((sizeof(void *) * 8 * 8) - 16) * 1024)
+#define AST_STACKSIZE (((sizeof(void *) * 8 * 8) - 16) * 1024)
+#define AST_STACKSIZE_LOW (((sizeof(void *) * 8 * 2) - 16) * 1024)
-#if defined(LOW_MEMORY)
-#define AST_BACKGROUND_STACKSIZE (((sizeof(void *) * 8 * 2) - 16) * 1024)
-#else
-#define AST_BACKGROUND_STACKSIZE AST_STACKSIZE
-#endif
+int ast_background_stacksize(void);
+
+#define AST_BACKGROUND_STACKSIZE ast_background_stacksize()
void ast_register_thread(char *name);
void ast_unregister_thread(void *id);