OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- Data Structures
- Class Hierarchy
- Data Fields

Public Member Functions | Data Fields
evbuffer Struct Reference

## Public Member Functions
| TAILQ_HEAD (evbuffer_cb_queue, evbuffer_cb_entry) callbacks
| A doubly-linked-list of callback functions.

## Data Fields
struct evbuffer_chain * | first
| The first chain in this buffer's linked list of chains. More...
struct evbuffer_chain * | last
| The last chain in this buffer's linked list of chains. More...
struct evbuffer_chain ** | last_with_datap
| Pointer to the next pointer pointing at the 'last_with_data' chain. More...
size_t | total_len
| Total amount of bytes stored in all chains. More...
size_t | n_add_for_cb
| Number of bytes we have added to the buffer since we last tried to invoke callbacks. More...
size_t | n_del_for_cb
| Number of bytes we have removed from the buffer since we last tried to invoke callbacks. More...
void * | lock
| A lock used to mediate access to this buffer. More...
unsigned | own_lock: 1
| True iff we should free the lock field when we free this evbuffer. More...
unsigned | freeze_start: 1
| True iff we should not allow changes to the front of the buffer (drains or prepends). More...
unsigned | freeze_end: 1
| True iff we should not allow changes to the end of the buffer (appends)
unsigned | deferred_cbs: 1
| True iff this evbuffer's callbacks are not invoked immediately upon a change in the buffer, but instead are deferred to be invoked from the event_base's loop. More...
struct deferred_cb_queue * | cb_queue
| Used to implement deferred callbacks. More...
int | refcnt
| A reference count on this evbuffer. More...
struct deferred_cb | deferred
| A deferred_cb handle to make all of this buffer's callbacks invoked from the event loop. More...
struct bufferevent * | parent
| The parent bufferevent object this evbuffer belongs to. More...

## Field Documentation

struct deferred_cb_queue* evbuffer::cb_queue

Used to implement deferred callbacks.

Referenced by evbuffer_defer_callbacks().

struct deferred_cb evbuffer::deferred

A deferred_cb handle to make all of this buffer's callbacks invoked from the event loop.

Referenced by evbuffer_defer_callbacks().

unsigned evbuffer::deferred_cbs

True iff this evbuffer's callbacks are not invoked immediately upon a change in the buffer, but instead are deferred to be invoked from the event_base's loop.

Useful for preventing enormous stack overflows when we have mutually recursive callbacks, and for serializing callbacks in a single thread.

Referenced by evbuffer_defer_callbacks().

struct evbuffer_chain* evbuffer::first

The first chain in this buffer's linked list of chains.

Referenced by evbuffer_add_buffer(), evbuffer_copyout(), evbuffer_drain(), evbuffer_get_contiguous_space(), evbuffer_launch_write(), evbuffer_new(), evbuffer_overlapped_new(), evbuffer_peek(), evbuffer_prepend(), evbuffer_prepend_buffer(), evbuffer_ptr_set(), evbuffer_pullup(), evbuffer_remove_buffer(), and evbuffer_write_atmost().

unsigned evbuffer::freeze_start

True iff we should not allow changes to the front of the buffer (drains or prepends).

Referenced by evbuffer_add_buffer(), evbuffer_copyout(), evbuffer_drain(), evbuffer_freeze(), evbuffer_launch_write(), evbuffer_prepend(), evbuffer_prepend_buffer(), evbuffer_readln(), evbuffer_remove_buffer(), evbuffer_unfreeze(), and evbuffer_write_atmost().

struct evbuffer_chain* evbuffer::last

The last chain in this buffer's linked list of chains.

Referenced by evbuffer_add(), evbuffer_commit_space(), evbuffer_pullup(), and evbuffer_remove_buffer().

struct evbuffer_chain** evbuffer::last_with_datap

Pointer to the next pointer pointing at the 'last_with_data' chain.

To unpack:

The last_with_data chain is the last chain that has any data in it. If all chains in the buffer are empty, it is the first chain. If the buffer has no chains, it is NULL.

The last_with_datap pointer points at whatever 'next' pointer points at the last_with_datap chain. If the last_with_data chain is the first chain, or it is NULL, then the last_with_datap pointer is &buf->first.

Referenced by evbuffer_commit_read(), evbuffer_commit_space(), evbuffer_drain(), evbuffer_new(), evbuffer_overlapped_new(), evbuffer_prepend(), evbuffer_pullup(), evbuffer_read(), and evbuffer_remove_buffer().

void* evbuffer::lock

A lock used to mediate access to this buffer.

Referenced by evbuffer_enable_locking().

size_t evbuffer::n_add_for_cb

Number of bytes we have added to the buffer since we last tried to invoke callbacks.

Referenced by evbuffer_add(), evbuffer_add_buffer(), evbuffer_add_file(), evbuffer_add_reference(), evbuffer_add_vprintf(), evbuffer_commit_space(), evbuffer_prepend(), evbuffer_prepend_buffer(), evbuffer_read(), and evbuffer_remove_buffer().

size_t evbuffer::n_del_for_cb

Number of bytes we have removed from the buffer since we last tried to invoke callbacks.

Referenced by evbuffer_add_buffer(), evbuffer_drain(), evbuffer_prepend_buffer(), and evbuffer_remove_buffer().

unsigned evbuffer::own_lock

True iff we should free the lock field when we free this evbuffer.

Referenced by evbuffer_enable_locking().

struct bufferevent* evbuffer::parent

The parent bufferevent object this evbuffer belongs to.

NULL if the evbuffer stands alone.

int evbuffer::refcnt

A reference count on this evbuffer.

When the reference count reaches 0, the buffer is destroyed. Manipulated with evbuffer_incref and evbuffer_decref_and_unlock and evbuffer_free.

Referenced by evbuffer_new(), and evbuffer_overlapped_new().

size_t evbuffer::total_len

Total amount of bytes stored in all chains.

Referenced by evbuffer_add(), evbuffer_add_buffer(), evbuffer_add_vprintf(), evbuffer_commit_read(), evbuffer_commit_space(), evbuffer_copyout(), evbuffer_drain(), evbuffer_get_length(), evbuffer_launch_write(), evbuffer_prepend(), evbuffer_prepend_buffer(), evbuffer_pullup(), evbuffer_read(), evbuffer_remove_buffer(), and evbuffer_write_atmost().

The documentation for this struct was generated from the following file:

- opal/mca/event/libevent2013/libevent/evbuffer-internal.h