/* ==================== enqueue_recv_queue() ==================== */ void enqueue_recv_queue(session_t *session, sockbuf_t *sockbuf) { __sync_add_and_fetch(&session->total_received_buffers, 1); work_queue_t *wq = get_recv_queue_by_session(SERVER(session), session); if ( wq != NULL ) { enqueue_work(wq, (void*)sockbuf); } }
void vnode_enqueue_write_queue(vnode_t *vnode, session_t *session, object_t *object) { vnode_write_queue_entry_t *entry = (vnode_write_queue_entry_t*)zmalloc(sizeof(vnode_write_queue_entry_t)); memset(entry, 0, sizeof(vnode_write_queue_entry_t)); entry->session = session; entry->object = object; enqueue_work(vnode->write_queue, entry); }