summaryrefslogtreecommitdiff
path: root/include/asterisk/channel.h
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2007-08-08 21:44:58 +0000
committerJoshua Colp <jcolp@digium.com>2007-08-08 21:44:58 +0000
commit22114b509dc93cd3f19610362bf3757db2c04787 (patch)
treed42170fbe8a83884d32f1ed09f238da151554071 /include/asterisk/channel.h
parent063c747f3a7120dca404ca845877019dc8c2a62d (diff)
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
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r--include/asterisk/channel.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h
index 39f2c636d..b58880853 100644
--- a/include/asterisk/channel.h
+++ b/include/asterisk/channel.h
@@ -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 */