From 4dd3abd41fe951b4c236c8e9920f17f3af7f4a6d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 24 Dec 2013 11:20:52 -0500 Subject: 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. --- bufferevent.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'bufferevent.c') diff --git a/bufferevent.c b/bufferevent.c index d8c84da4..19413369 100644 --- a/bufferevent.c +++ b/bufferevent.c @@ -252,17 +252,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) { -- cgit v1.2.1