summaryrefslogtreecommitdiff
path: root/bufferevent.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-12-24 11:20:52 -0500
committerNick Mathewson <nickm@torproject.org>2013-12-24 11:20:52 -0500
commit4dd3abd41fe951b4c236c8e9920f17f3af7f4a6d (patch)
tree419c40029034bcd98e82cff1dd86362e2520c5b8 /bufferevent.c
parentb4ef3def6f8d7dd9f6582b85be4539426ac04799 (diff)
downloadlibevent-4dd3abd41fe951b4c236c8e9920f17f3af7f4a6d.tar.gz
Make bufferevent_trigger_nolock_() inline
Since most of its callers are using constant EV_READ or EV_WRITE, and using constant 0 as its argument, this should eliminate most of the overhead for this function in the fast case.
Diffstat (limited to 'bufferevent.c')
-rw-r--r--bufferevent.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/bufferevent.c b/bufferevent.c
index d8c84da4..19413369 100644
--- a/bufferevent.c
+++ b/bufferevent.c
@@ -253,17 +253,6 @@ bufferevent_run_writecb_(struct bufferevent *bufev, int options)
}
void
-bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options)
-{
- if ((iotype & EV_READ) && ((options & BEV_TRIG_IGNORE_WATERMARKS) ||
- evbuffer_get_length(bufev->input) >= bufev->wm_read.low))
- bufferevent_run_readcb_(bufev, options);
- if ((iotype & EV_WRITE) && ((options & BEV_TRIG_IGNORE_WATERMARKS) ||
- evbuffer_get_length(bufev->output) <= bufev->wm_write.low))
- bufferevent_run_writecb_(bufev, options);
-}
-
-void
bufferevent_trigger(struct bufferevent *bufev, short iotype, int options)
{
bufferevent_incref_and_lock_(bufev);