mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-15 07:15:03 -04:00
Clarifications in response to merge req. comments
This commit is contained in:
parent
a7384c7824
commit
bd41947175
@ -340,10 +340,10 @@ int bufferevent_decref_(struct bufferevent *bufev);
|
|||||||
int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
|
int bufferevent_decref_and_unlock_(struct bufferevent *bufev);
|
||||||
|
|
||||||
/** Internal: If callbacks are deferred and we have a read callback, schedule
|
/** Internal: If callbacks are deferred and we have a read callback, schedule
|
||||||
* a readcb. Otherwise just run the readcb. */
|
* a readcb. Otherwise just run the readcb. Ignores watermarks. */
|
||||||
void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
|
void bufferevent_run_readcb_(struct bufferevent *bufev, int options);
|
||||||
/** Internal: If callbacks are deferred and we have a write callback, schedule
|
/** Internal: If callbacks are deferred and we have a write callback, schedule
|
||||||
* a writecb. Otherwise just run the writecb. */
|
* a writecb. Otherwise just run the writecb. Ignores watermarks. */
|
||||||
void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
|
void bufferevent_run_writecb_(struct bufferevent *bufev, int options);
|
||||||
/** Internal: If callbacks are deferred and we have an eventcb, schedule
|
/** Internal: If callbacks are deferred and we have an eventcb, schedule
|
||||||
* it to run with events "what". Otherwise just run the eventcb.
|
* it to run with events "what". Otherwise just run the eventcb.
|
||||||
@ -352,7 +352,8 @@ void bufferevent_run_eventcb_(struct bufferevent *bufev, short what, int options
|
|||||||
|
|
||||||
/** Internal: Run or schedule (if deferred or options contain
|
/** Internal: Run or schedule (if deferred or options contain
|
||||||
* BEV_TRIG_DEFER_CALLBACKS) I/O callbacks specified in iotype.
|
* BEV_TRIG_DEFER_CALLBACKS) I/O callbacks specified in iotype.
|
||||||
* Must already hold the bufev lock. */
|
* Must already hold the bufev lock. Honors watermarks unless
|
||||||
|
* BEV_TRIG_IGNORE_WATERMARKS is in options. */
|
||||||
void bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options);
|
void bufferevent_trigger_nolock_(struct bufferevent *bufev, short iotype, int options);
|
||||||
|
|
||||||
|
|
||||||
|
@ -629,14 +629,14 @@ bufferevent_getwatermark(struct bufferevent *bufev, short events,
|
|||||||
size_t *lowmark, size_t *highmark)
|
size_t *lowmark, size_t *highmark)
|
||||||
{
|
{
|
||||||
BEV_LOCK(bufev);
|
BEV_LOCK(bufev);
|
||||||
if (events & EV_WRITE) {
|
if (events == EV_WRITE) {
|
||||||
if (lowmark)
|
if (lowmark)
|
||||||
*lowmark = bufev->wm_write.low;
|
*lowmark = bufev->wm_write.low;
|
||||||
if (highmark)
|
if (highmark)
|
||||||
*highmark = bufev->wm_write.high;
|
*highmark = bufev->wm_write.high;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (events & EV_READ) {
|
if (events == EV_READ) {
|
||||||
if (lowmark)
|
if (lowmark)
|
||||||
*lowmark = bufev->wm_read.low;
|
*lowmark = bufev->wm_read.low;
|
||||||
if (highmark)
|
if (highmark)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user