29 #define AST_DIR_MODE 0777 32 #define AST_FILE_MODE 0666 44 #define DEFAULT_LANGUAGE "en" 46 #define DEFAULT_SAMPLE_RATE 8000 47 #define DEFAULT_SAMPLES_PER_MS ((DEFAULT_SAMPLE_RATE)/1000) 48 #define setpriority __PLEASE_USE_ast_set_priority_INSTEAD_OF_setpriority__ 49 #define sched_setscheduler __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__ 50 #define strtok __PLEASE_USE_strtok_r_INSTEAD_OF_strtok__ 52 #if defined(DEBUG_FD_LEAKS) && !defined(STANDALONE) && !defined(STANDALONE2) && !defined(STANDALONE_AEL) 55 #include <sys/socket.h> 58 #define open(a,...) __ast_fdleak_open(__FILE__,__LINE__,__PRETTY_FUNCTION__, a, __VA_ARGS__) 59 #define pipe(a) __ast_fdleak_pipe(a, __FILE__,__LINE__,__PRETTY_FUNCTION__) 60 #define socketpair(a,b,c,d) __ast_fdleak_socketpair(a, b, c, d, __FILE__,__LINE__,__PRETTY_FUNCTION__) 61 #define socket(a,b,c) __ast_fdleak_socket(a, b, c, __FILE__,__LINE__,__PRETTY_FUNCTION__) 62 #define accept(a,b,c) __ast_fdleak_accept(a, b, c, __FILE__,__LINE__,__PRETTY_FUNCTION__) 63 #define close(a) __ast_fdleak_close(a) 64 #define fopen(a,b) __ast_fdleak_fopen(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 65 #define fclose(a) __ast_fdleak_fclose(a) 66 #define dup2(a,b) __ast_fdleak_dup2(a, b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 67 #define dup(a) __ast_fdleak_dup(a, __FILE__,__LINE__,__PRETTY_FUNCTION__) 69 #if defined(__cplusplus) || defined(c_plusplus) 72 int __ast_fdleak_open(
const char *
file,
int line,
const char *func,
const char *path,
int flags, ...);
73 int __ast_fdleak_pipe(
int *fds,
const char *file,
int line,
const char *func);
74 int __ast_fdleak_socketpair(
int domain,
int type,
int protocol,
int sv[2],
75 const char *file,
int line,
const char *func);
76 int __ast_fdleak_socket(
int domain,
int type,
int protocol,
const char *file,
int line,
const char *func);
77 int __ast_fdleak_accept(
int socket,
struct sockaddr *
address, socklen_t *address_len,
78 const char *file,
int line,
const char *func);
79 #if defined(HAVE_EVENTFD) 80 #include <sys/eventfd.h> 81 #define eventfd(a,b) __ast_fdleak_eventfd(a,b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 82 int __ast_fdleak_eventfd(
unsigned int initval,
int flags,
const char *file,
int line,
const char *func);
84 #if defined(HAVE_TIMERFD) 85 #include <sys/timerfd.h> 86 #define timerfd_create(a,b) __ast_fdleak_timerfd_create(a,b, __FILE__,__LINE__,__PRETTY_FUNCTION__) 87 int __ast_fdleak_timerfd_create(
int clockid,
int flags,
const char *file,
int line,
const char *func);
89 int __ast_fdleak_close(
int fd);
90 FILE *__ast_fdleak_fopen(
const char *path,
const char *mode,
const char *file,
int line,
const char *func);
91 int __ast_fdleak_fclose(FILE *ptr);
92 int __ast_fdleak_dup2(
int oldfd,
int newfd,
const char *file,
int line,
const char *func);
93 int __ast_fdleak_dup(
int oldfd,
const char *file,
int line,
const char *func);
94 #if defined(__cplusplus) || defined(c_plusplus) 176 #define HAVE_MTX_PROFILE 196 int64_t
ast_mark(
int,
int start1_stop0);
213 #define __stringify_1(x) #x 214 #define __stringify(x) __stringify_1(x) 216 #if defined(AST_IN_CORE) \ 217 || (!defined(AST_MODULE_SELF_SYM) \ 218 && (defined(STANDALONE) || defined(STANDALONE2) || defined(AST_NOT_MODULE))) 220 #define AST_MODULE_SELF NULL 222 #elif defined(AST_MODULE_SELF_SYM) 225 #define AST_MODULE_SELF AST_MODULE_SELF_SYM() 233 #error "Externally compiled modules must declare AST_MODULE_SELF_SYM."
Asterisk memory management routines.
int64_t ast_mark(int, int start1_stop0)
Main Channel structure associated with a channel.
int ast_shutting_down(void)
int64_t ast_profile(int, int64_t)
Structure for variables, used for configurations and for channel variables.
int ast_pbx_uuid_get(char *pbx_uuid, int length)
Retrieve the PBX UUID.
#define AST_MODULE_SELF_SYM
int ast_register_cleanup(void(*func)(void))
Register a function to be executed before Asterisk gracefully exits.
void ast_unregister_atexit(void(*func)(void))
Unregister a function registered with ast_register_atexit().
int ast_register_atexit(void(*func)(void))
Register a function to be executed before Asterisk exits.
int ast_set_priority(int)
We set ourselves to a high priority, that we might pre-empt everything else. If your PBX has heavy ac...
int ast_add_profile(const char *, uint64_t scale)
support for event profiling
int ast_shutdown_final(void)
The descriptor of a dynamic string XXX storage will be optimized later if needed We use the ts field ...
General Definitions for Asterisk top level program Included by asterisk.h to handle platform-specific...
int ast_cancel_shutdown(void)
Cancel an existing shutdown and return to normal operation.
Data structure associated with a single frame of data.
Abstract JSON element (object, array, string, int, ...).