mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Add support for using epoll instead of poll. This should increase scalability and is done in such a way that we should be able to add support for other poll() replacements.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -114,6 +114,9 @@
|
||||
/* Define to 1 if you have the `endpwent' function. */
|
||||
#undef HAVE_ENDPWENT
|
||||
|
||||
/* Define to 1 if your system has working epoll support. */
|
||||
#undef HAVE_EPOLL
|
||||
|
||||
/* Define this to indicate the ${EXP10_DESCRIP} library */
|
||||
#undef HAVE_EXP10
|
||||
|
||||
|
@@ -316,6 +316,8 @@ struct ast_channel_tech {
|
||||
int (* func_channel_write)(struct ast_channel *chan, const char *function, char *data, const char *value);
|
||||
};
|
||||
|
||||
struct ast_epoll_data;
|
||||
|
||||
/*!
|
||||
* The high bit of the frame count is used as a debug marker, so
|
||||
* increments of the counters must be done with care.
|
||||
@@ -490,6 +492,11 @@ struct ast_channel {
|
||||
|
||||
/*! \brief Data stores on the channel */
|
||||
AST_LIST_HEAD_NOLOCK(datastores, ast_datastore) datastores;
|
||||
|
||||
#ifdef HAVE_EPOLL
|
||||
int epfd;
|
||||
struct ast_epoll_data *epfd_data[AST_MAX_FDS];
|
||||
#endif
|
||||
};
|
||||
|
||||
/*! \brief ast_channel_tech Properties */
|
||||
@@ -1184,6 +1191,15 @@ void ast_deactivate_generator(struct ast_channel *chan);
|
||||
|
||||
void ast_set_callerid(struct ast_channel *chan, const char *cidnum, const char *cidname, const char *ani);
|
||||
|
||||
/*! Set the file descriptor on the channel */
|
||||
void ast_channel_set_fd(struct ast_channel *chan, int which, int fd);
|
||||
|
||||
/*! Add a channel to an optimized waitfor */
|
||||
void ast_poll_channel_add(struct ast_channel *chan0, struct ast_channel *chan1);
|
||||
|
||||
/*! Delete a channel from an optimized waitfor */
|
||||
void ast_poll_channel_del(struct ast_channel *chan0, struct ast_channel *chan1);
|
||||
|
||||
/*! Start a tone going */
|
||||
int ast_tonepair_start(struct ast_channel *chan, int freq1, int freq2, int duration, int vol);
|
||||
/*! Stop a tone from playing */
|
||||
|
Reference in New Issue
Block a user